cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A053001 Largest prime < n^2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 21 2000

Keywords

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.

Crossrefs

Programs

  • Haskell
    a053001 = a007917 . a000290  -- 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 *)
  • PARI
    a(n) = precprime(n^2) \\ Michel Marcus, Oct 14 2013
    
  • 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

Formula

a(n) = A007917(A000290(n)). - Reinhard Zumkeller, Jun 07 2015

Extensions

More terms from James Sellers, Feb 22 2000