# Legendre's conjecture

Plot of the number of primes between n2 and (n + 1)2

Legendre's conjecture, proposed by Adrien-Marie Legendre, states that there is a prime number between n2 and (n + 1)2 for every positive integer n. The conjecture is one of Landau's problems (1912) on prime numbers and remains unsolved.

## Prime gaps

Legendre's conjecture is one of a family of results and conjectures related to prime gaps, that is, to the spacing between prime numbers.

The prime number theorem implies that the actual number of primes between n2 and (n + 1)2 is asymptotic to n/ln(n). Since this number is large for large n, this lends credence to Legendre's conjecture.

If Legendre's conjecture is true, the gap between any prime p and the next largest prime would always be at most on the order of $\sqrt{p}$;[a] in big O notation, the gaps are $O(\sqrt p)$. Two stronger conjectures, Andrica's conjecture and Oppermann's conjecture, also both imply that the gaps have the same magnitude. It does not, however, provide a solution to the Riemann Hypothesis, but rather strengthens one of the implications of its correctness.

Harald Cramér conjectured that the gaps are always much smaller, of the order $(\log p)^2$. If Cramér's conjecture is true, Legendre's conjecture would follow for all sufficiently large n. Cramér also proved that the Riemann hypothesis implies a weaker bound of $O(\sqrt p\log p)$ on the size of the largest prime gaps.[1]

Baker, Harman and Pintz proved that there is a prime in the interval $[x,\,x+O(x^{21/40})]$ for all large $x$.[2]

A table of maximal prime gaps shows that the conjecture holds to 1018.[3] A counterexample near 1018 would require a prime gap fifty million times the size of the average gap.

Legendre's conjecture implies that at least one prime can be found in every half revolution of the Ulam spiral.

3. ^ Oliveira e Silva, Tomás; Herzog, Siegfried; Pardi, Silvio (2014), "Empirical verification of the even Goldbach conjecture and computation of prime gaps up to $4\cdot10^{18}$", Mathematics of Computation 83 (288): 2033–2060, doi:10.1090/S0025-5718-2013-02787-1, MR 3194140.