English

An algorithm and computation to verify Legendre's Conjecture up to $3.33\cdot10^{13}$

Number Theory 2024-12-11 v1

Abstract

We state a general purpose algorithm for quickly finding primes in evenly divided sub-intervals. Legendre's conjecture claims that for every positive integer nn, there exists a prime between n2n^2 and (n+1)2(n+1)^2. Oppermann's conjecture subsumes Legendre's conjecture by claiming there are primes between n2n^2 and n(n+1)n(n+1) and also between n(n+1)n(n+1) and (n+1)2(n+1)^2. Using Cram\'er's conjecture as the basis for a heuristic run-time analysis, we show that our algorithm can verify Oppermann's conjecture, and hence also Legendre's conjecture, for all nNn\le N in time O(NlogNloglogN)O( N \log N \log \log N) and space NO(1/loglogN)N^{O(1/\log \log N)}. We implemented a parallel version of our algorithm and improved the empirical verification of Oppermann's conjecture from the previous N=2109N = 2\cdot 10^{9} up to N=3.331013N = 3.33\cdot 10^{13}, so we were finding 2727 digit primes. The computation ran for about half a year on four Intel Xeon Phi 72107210 processors using a total of 256256 cores.

Keywords

Cite

@article{arxiv.2401.13753,
  title  = {An algorithm and computation to verify Legendre's Conjecture up to $3.33\cdot10^{13}$},
  author = {Jonathan Sorenson and Jonathan Webster},
  journal= {arXiv preprint arXiv:2401.13753},
  year   = {2024}
}
R2 v1 2026-06-28T14:26:16.875Z