OFFSET
2,1
COMMENTS
Suggested by Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2.
Legendre's conjecture is equivalent to a(n) > (n-1)^2. - John W. Nicholson, Dec 11 2013
REFERENCES
J. R. Goldman, The Queen of Mathematics, 1998, p. 82.
LINKS
T. D. Noe, Table of n, a(n) for n=2..1000
FORMULA
MAPLE
[seq(prevprime(i^2), i=2..100)];
MATHEMATICA
Table[Prime[PrimePi[n^2]], {n, 2, 60}] (* Stefan Steinerberger, Apr 01 2006 *)
Table[NextPrime[n^2, -1], {n, 2, 60}] (* Jean-François Alcover, Oct 14 2013 *)
PROG
(PARI) a(n) = precprime(n^2) \\ Michel Marcus, Oct 14 2013
(Haskell)
a053001 = a007917 . a000290 -- Reinhard Zumkeller, Jun 07 2015
(Python)
from sympy import prevprime
def a(n): return prevprime(n*n)
print([a(n) for n in range(2, 52)]) # Michael S. Branicky, Jul 29 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