OFFSET
1,5
COMMENTS
Immediate connection to unsolved problem, is there always a prime between n^2 and (n+1)^2 ("full" interval of two consecutive squares).
First ("left") half interval: number of primes q (2m-1)^2+1 <= q < (2m)^2-(2m-1).
It is conjectured that a(n) >= 1 for n >= 1.
No a(m) with m>9 is known, where a(m)=1.
REFERENCES
L. E. Dickson, History of the Theory of Numbers, Vol, I: Divisibility and Primality, AMS Chelsea Publ., 1999
R. K. Guy, Unsolved Problems in Number Theory (2nd ed.) New York: Springer-Verlag, 1994
P. Ribenboim, The New Book of Prime Number Records. Springer. 1996
EXAMPLE
n=1: 2 <= q < 3 => prime 2: a(1)=1;
n=5: 82 <= q < 91 => primes 83,89: a(5)=2;
n=9: 290 <= q < 307 => prime 293: a(9)=1;
n=30: 3482 <= q < 3541 => prime 3491,3499,3511,3517,3527,3529,3533,3539: a(30)=8.
PROG
(PARI) a(n) = if (n==1, 1, primepi((2*n)^2-(2*n-1)-1) - primepi((2*n-1)^2+1)); \\ Michel Marcus, May 18 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 22 2009
EXTENSIONS
More terms from Michel Marcus, May 18 2020
STATUS
approved