$ $Let $n$ and $p$ be positive integers. If Legendre's conjecture is true, for $n≧1$, there is at least one prime number $p$ satisfying the following inequalities.
$$n^2< p<(n+1)^2$$
Ⅰ. When $n<3$
$ $There are prime numbers $2$ and $3$ between $1$ and $4$. In the same way, there are prime numbers $5$ and $7$. Therefore, Legendre's conjecture is true when $n<3$ holds.
Ⅱ. When $n≧3$
$ $We suppose that $p$ satisfies the following inequalities.
$$n^2< p< n(n+1)\ …(1)$$
Let $q$ be a positive integer. If any $p$ is a composite number and has prime factors, the largest possible factor of $p$ in the range of the inequalities (1) is $n(n+1)/2-1$ and $p$ must be divided by $q$ which is from $n+2$ to $(n^2+n-1)/2$ since $n$ and $n+1$ cannot divide $p$.
$$n+1< q< n(n+1)/2\ …(2)$$
$ $We will consider the case where $p$ is divisible by $q$ satisfying the inequalities above. Let $r$ be a positive integer and the quotient when $p$ is divided. $r$ must be satisfied the following inequalities.
$$1< r< n\ …(3)$$
If it is assumed that $p$ are all composite numbers in the range of the inequalities (1), $p$ must be divided by $q$ in the inequalities (2). When $p$ is a composite number, one $p$ corresponds to some combinations of $q$ and $r$. $p$ has a one-to-one correspondence with $q$ since the maximum value of $p$ in the inequalities (1) is less than twice the minimum value of $p$ and the maximum $p$ must be equal to or more than double the other $p$ if $p$ has a one-to-many correspondence with $q$. And $p$ has a one-to-many correspondence with $r$.
We will apply a rule to select the relations from $p$ to $r$ and consider the case when $n=9$ holds.
When $p=82$, $(q,r)=(41,2)$
When $p=84$, $(q,r)=(42,2)$,$(28,3)$,$(21,4)$,$(14,6)$,$(12,7)$
When $p=85$, $(q,r)=(17,5)$
When $p=86$, $(q,r)=(43,2)$
When $p=87$, $(q,r)=(29,3)$
When $p=88$, $(q,r)=(44,2)$,$(22,4)$,$(11,8)$
Define $[p,r]$ as a relation from $p$ to $r$. We will select relations between $p$ and $r$ so that there are all one-to-one correspondences. At first the relations are selected by $r$ which are multiples of $2$ for each $p$. $[82,2]$ is sorted out when $p=82$ holds. Then $[84,4]$ is sorted out since $r=2$ has been selected. When $p=86$ holds, there is one combination $(q,r)=(43,2)$ and $r=2$ has been taken from. In this case, we consider to use the factor $2$ of $6$ and think that there is a relation $[86,6]$. Then $[88,8]$ is sorted out. Next, we select the relation by $3$ multiples $r$ and $[87,3]$ is sorted out.
$ $When $r$ is a composite number, we skip the number since we have already taken from the relations by a multiple of the prime factor of $r$. Next, we select relations by multiples of prime numbers greater than or equal to $5$.
$ $Let $a(n,r)$ and $b(n,r)$ be integers and $a(n,r)$ be the number of $r$ multiples in the range of the inequalities (1) and $b(n,r)$ be that in the range of the inequalities (3). The following inequalities hold.
$$a(n,r)≦b(n,r)+1$$
When $n=8$ holds, $a(8,5)=2$, $b(8,5)=1$ and $a(8,5)>b(8,5)$ hold.
When $p=65$, $(q,r)=(13,5)$
When $p=66$, $(q,r)=(33,2)$,$(22,3)$,$(11,6)$
When $p=68$, $(q,r)=(34,2)$,$(17,4)$
When $p=69$, $(q,r)=(23,3)$
When $p=70$, $(q,r)=(35,2)$,$(14,5)$,$(10,7)$
Let $s$ be a positive integer. Starting with the smallest prime number $2$, for the $s$th $p$ that is a multiple of the prime number, we select a relation with $r$ as $s$ multiples of the prime number. In this case, we select the relations $[66,2]$, $[68,4]$, $[70,6]$ when $r=2$ holds, $[69,3]$ when $r=3$ holds and $[65,5]$ when $r=5$ holds. Let $t$ be a prime number less than $r$. In the case of $a(n,r)>b(n,r)$, the actual increase in the number of relations between $p$ and $r$ at the time of making the selection is less than or equal to $b(n,r)$ because one of the $t$ adjacent multiples of $r$ is a multiple of $t$ and the relations have already been selected by $t$ multiples. The values of $t$ for which $a(n,t)=b(n,t)$ holds can be considered $2$ or $3$ for $n≧3$ as follows.
$ $Let $m$ be an integer.
・When $n=2m$ and $m>1$
$a(2m,2)=floor(((2m)^2+2m-1)/2)-floor((2m)^2/2)=m-1$
$b(2m,2)=floor((2m-1)/2)=m-1$
・When $n=2m+1$ and $m>0$
$a(2m+1,2)=floor(((2m+1)^2+2m+1-1)/2)-floor((2m+1)^2/2)=m$
$b(2m+1,2)=floor((2m+1-1)/2)=m$
Therefore, $a(n,2)=b(n,2)$ holds when $n≧3$ holds.
・When $n=3m$ and $m>0$
$a(3m,3)=floor(((3m)^2+3m-1)/3)-floor((3m)^2/3)=m-1$
$b(3m,3)=floor((3m-1)/3)=m-1$
・When $n=3m+1$ and $m>0$
$a(3m+1,3)=floor(((3m+1)^2+3m+1-1)/3)-floor((3m+1)^2/3)=m$
$b(3m+1,3)=floor((3m+1-1)/3)=m$
・When $n=3m+2$ and $m>0$
$a(3m+2,3)=floor(((3m+2)^2+3m+2-1)/3)-floor((3m+2)^2/3)=m$
$b(3m+2,3)=floor((3m+2-1)/3)=m$
Therefore, $a(n,3)=b(n,3)$ holds when $n≧3$ holds.
From the above, $a(n,2)=b(n,2)$ and $a(n,3)=b(n,3)$ hold for $n≧3$.
$ $We will consider the case when $n=17$ holds.
When $n=17$ holds, $a(17,5)=4$, $b(17,5)=3$ and $a(17,5)>b(17,5)$ hold.
When $p=290$, $(q,r)=(145,2)$,$(58,5)$,$(29,10)$
When $p=291$, $(q,r)=(97,3)$
When $p=292$, $(q,r)=(146,2)$,$(73,4)$
When $p=294$, $(q,r)=(147,2)$,$(98,3)$,$(49,6)$,$(42,7)$,$(21,14)$
When $p=295$, $(q,r)=(59,5)$
When $p=296$, $(q,r)=(148,2)$,$(74,4)$,$(37,8)$
When $p=297$, $(q,r)=(99,3)$,$(33,9)$,$(27,11)$
When $p=298$, $(q,r)=(149,2)$
When $p=299$, $(q,r)=(23,13)$
When $p=300$, $(q,r)=(150,2)$,$(100,3)$,$(75,4)$,$(60,5)$,$(50,6)$,$(30,10)$,$(25,12)$,$(20,15)$
When $p=301$, $(q,r)=(43,7)$
When $p=302$, $(q,r)=(151,2)$
When $p=303$, $(q,r)=(101,3)$
When $p=304$, $(q,r)=(152,2)$,$(76,4)$,$(38,8)$,$(19,16)$
When $p=305$, $(q,r)=(61,5)$
In the beginning, we select the relations $[290,2]$, $[292,4]$, $[294,6]$, $[296,8]$, $[298,10]$, $[300,12]$, $[302,14]$ and $[304,16]$ when $r=2$ holds. Then we select $[291,3]$, $[297,9]$ and $[303,15]$ when $r=3$ holds. The numbers of $r$, $6$ and $12$ are skipped since these have already been selected when $r=2$ holds. When $r=5$ holds, we should select the relations in the case of $p=295$ and $p=305$. However, there is only $5$ for $r$ which corresponds to p since $10$ and $15$ have already been taken from. With this method, we cannot select one-to-one correspondences between $p$ and $r$.
$ $And so, we will change the rules as follows. We establish relations by the prime numbers in descending order, assign a distinct value of $r$ to each group of $p$-values corresponding to a specific odd prime $r$ and set $r$-values by incrementing $1$, starting from $2$. The values of $p$ corresponding to the values of $r$ and $b(17,r)$ are as follows.
When $r=13$, $p=299$, $b(17,13)=1$
When $r=11$, $p=297$, $b(17,11)=1$
When $r=7$, $p=294$,$301$, $b(17,7)=2$
When $r=5$, $p=290$,$295$,$300$,$305$, $b(17,5)=3$
When $r=3$, $p=291$,$294$,$297$,$300$,$303$, $b(17,3)=5$
When $r=2$, $p=290$,$292$,$294$,$296$,$298$,$300$,$302$,$304$, $b(17,r)=8$
In cases where $a(n,r)>b(n,r)$ holds, the number of $p$-values grouped in a specific $r$ exceeds the number of $r$-values by $1$ as described above and we defer the relation assignment of an even $p$ among them to the $r=2$ group. Though, one $r$-value is consumed when establishing the relation for $p=297$ at $r=11$ in the case $n=17$, $p=297$ has already been consumed during the relation assignment for the $r=3$ group, so no imbalance between $p$ and $r$ arise. Generally, if a $p$-value is a multiple of primes smaller than the $r$-value currently being grouped, the differences between the counts of $p$ and $r$ remain unchanged when the relations are selected within the primes' groups. For $n=17$, the relations between $p$ and $r$ are established as follows.
When $r=13$, $[299,2]$
When $r=11$, $[297,3]$
When $r=7$, $[294,4]$,$[301,5]$
When $r=5$, $[290,6]$,$[295,7]$,$[305,8]$
When $r=3$, $[291,9]$,$[300,10]$,$[303,11]$
When $r=2$, $[292,12]$,$[296,13]$,$[298,14]$,$[302,15]$,$[304,16]$
Based on the above, we find that for $n≧3$, one-to-one correspondences between $p$ and $r$ can be established.
$ $However, it becomes a contradiction since the number of $p$ in the inequalities (1), $n-1$ is greater than the number of $r$ in the inequalities (3), $n-2$ and it is not possible to establish a one-to-one correspondence between $p$ and $r$. Therefore, the assumption that $p$ are all composite numbers in the range is false and there is at least one prime number in the range of the inequalities (1) when $n≧3$ holds. From the above Ⅰ and Ⅱ, it is proved that Legendre's conjecture is true. (Q.E.D.)