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.

A007491 Smallest prime > n^2.

This page as a plain text file.
%I A007491 M1389 #76 Feb 16 2025 08:32:31
%S A007491 2,5,11,17,29,37,53,67,83,101,127,149,173,197,227,257,293,331,367,401,
%T A007491 443,487,541,577,631,677,733,787,853,907,967,1031,1091,1163,1229,1297,
%U A007491 1373,1447,1523,1601,1693,1777,1861,1949,2027,2129,2213,2309,2411,2503
%N A007491 Smallest prime > n^2.
%C A007491 Suggested by Legendre's conjecture (still open) that there is always a prime between n^2 and (n+1)^2.
%C A007491 Legendre's conjecture is equivalent to a(n) < (n+1)^2. - _Jean-Christophe Hervé_, Oct 26 2013
%C A007491 From _Jaroslav Krizek_, Apr 02 2016: (Start)
%C A007491 Conjectures:
%C A007491 1) There is always a prime p between n^2 and n^2+n (verified up to 13*10^6).
%C A007491 2) a(n) is the smallest prime p such that n^2 < p < n^2+n; a(n) < n^2+n.
%C A007491 3) For all numbers k >= 1 there is the smallest number m > 2*(k+1) such that for all numbers n >= m there is always a prime p between n^2 and n^2 + n - 2k. Sequence of numbers m for k >= 1: 6, 8, 12, 13, 14, 24, 24, 24, 30, 30, 30, 31, 33, 35, 43, ...; lim_{k->oo} m/2k = 1. Example: k=2; for all numbers n >= 8 there is always a prime p between n^2 and n^2 + n - 4. (End)
%D A007491 Archimedeans Problems Drive, Eureka, 24 (1961), 20.
%D A007491 J. R. Goldman, The Queen of Mathematics, 1998, p. 82.
%D A007491 G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 19.
%D A007491 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007491 Jean-Christophe Hervé, <a href="/A007491/b007491.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A007491 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LandausProblems.html">Landau's Problem</a>.
%H A007491 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LegendresConjecture.html">Legendre's Conjecture</a>.
%F A007491 a(n) = A007918(A000290(n)). - _Reinhard Zumkeller_, Jun 07 2015
%p A007491 [seq(nextprime(i^2), i=1..100)];
%t A007491 NextPrime[Range[60]^2]  (* _Harvey P. Dale_, Mar 24 2011 *)
%o A007491 (PARI) vector(100,i,nextprime(i^2))
%o A007491 (Magma) [NextPrime(n^2): n in [1..50]]; // _Vincenzo Librandi_, Apr 30 2015
%o A007491 (Haskell)
%o A007491 a007491 = a007918 . a000290  -- _Reinhard Zumkeller_, Jun 07 2015
%o A007491 (Python)
%o A007491 from sympy import nextprime
%o A007491 def a(n): return nextprime(n**2)
%o A007491 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Jan 13 2023
%Y A007491 Cf. A053000, A053001, A014085, A144831.
%Y A007491 Cf. A007918, A000290.
%K A007491 nonn,easy,nice
%O A007491 1,1
%A A007491 _N. J. A. Sloane_, _Robert G. Wilson v_, _R. K. Guy_
%E A007491 More terms from _Labos Elemer_, Nov 17 2000
%E A007491 Definition modified by _Jean-Christophe Hervé_, Oct 26 2013