login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A053001
Largest prime < n^2.
26
3, 7, 13, 23, 31, 47, 61, 79, 97, 113, 139, 167, 193, 223, 251, 283, 317, 359, 397, 439, 479, 523, 571, 619, 673, 727, 773, 839, 887, 953, 1021, 1087, 1153, 1223, 1291, 1367, 1439, 1511, 1597, 1669, 1759, 1847, 1933, 2017, 2113, 2207, 2297, 2399, 2477, 2593
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.
FORMULA
a(n) = A007917(A000290(n)). - Reinhard Zumkeller, Jun 07 2015
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