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.

A053000 a(n) = (smallest prime > n^2) - n^2.

Original entry on oeis.org

2, 1, 1, 2, 1, 4, 1, 4, 3, 2, 1, 6, 5, 4, 1, 2, 1, 4, 7, 6, 1, 2, 3, 12, 1, 6, 1, 4, 3, 12, 7, 6, 7, 2, 7, 4, 1, 4, 3, 2, 1, 12, 13, 12, 13, 2, 13, 4, 5, 10, 3, 8, 3, 10, 1, 12, 1, 2, 7, 10, 7, 6, 3, 20, 3, 4, 1, 4, 13, 22, 3, 10, 5, 4, 1, 14, 3, 10, 5, 6, 21, 2, 9, 10, 1, 4, 15, 4, 9, 6, 1, 6, 3, 14
Offset: 0

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.
Record values are listed in A070317, their indices in A070316. - M. F. Hasler, Mar 23 2013
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.

Crossrefs

Programs

  • Magma
    [NextPrime(n^2) - n^2: n in [0..100]]; // Vincenzo Librandi, 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 *)
  • PARI
    A053000(n)=nextprime(n^2)-n^2  \\ M. F. Hasler, Mar 23 2013
    
  • 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

Formula

a(n) = A013632(n^2). - Robert Israel, Jul 06 2015

Extensions

More terms from James Sellers, Feb 22 2000