OFFSET
0,1
COMMENTS
Suggested by Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2.
Conjecture: a(n) <= 1+phi(n) = 1+A000010(n), for n>0. This improves on Oppermann's conjecture, which says a(n) < n. - _Jianglin Luo_, Sep 22 2023
REFERENCES
J. R. Goldman, The Queen of Mathematics, 1998, p. 82.
R. K. Guy, Unsolved Problems in Number Theory, Section A1.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = A013632(n^2). - _Robert Israel_, Jul 06 2015
MAPLE
A053000 := n->nextprime(n^2)-n^2;
MATHEMATICA
nxt[n_]:=Module[{n2=n^2}, NextPrime[n2]-n2]
nxt/@Range[0, 100] (* _Harvey P. Dale_, Dec 20 2010 *)
PROG
(PARI) A053000(n)=nextprime(n^2)-n^2 \\ _M. F. Hasler_, Mar 23 2013
(Magma) [NextPrime(n^2) - n^2: n in [0..100]]; // _Vincenzo Librandi_, Jul 06 2015
(Python)
from sympy import nextprime
def a(n): nn = n*n; return nextprime(nn) - nn
print([a(n) for n in range(94)]) # _Michael S. Branicky_, Feb 17 2022
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
_N. J. A. Sloane_, Feb 21 2000
EXTENSIONS
More terms from _James A. Sellers_, Feb 22 2000
STATUS
approved