A159802 Number of primes q with (2m)^2+1 <= q < (2m+1)^2-2m.
1, 2, 2, 2, 4, 2, 2, 4, 2, 3, 4, 4, 4, 4, 4, 5, 4, 7, 6, 8, 5, 4, 7, 7, 6, 9, 7, 7, 6, 8, 7, 9, 7, 10, 11, 7, 10, 12, 9, 6, 9, 8, 8, 8, 9, 8, 10, 10, 12, 11, 11, 12, 13, 9, 12, 14, 13, 11, 10, 14, 11, 14, 15, 12, 16, 14, 16, 11, 12, 11, 12, 14, 14, 15, 15, 13, 17, 15, 16, 18, 17, 15, 12, 12
Offset: 1
Keywords
Examples
1) m=1: 5 <= q < 7 => prime 5: a(1)=1. 2) m=2: 17 <= q < 21 => primes 17, 19: a(2)=2. 3) m=3: 37 <= q < 43 => primes 37, 41: a(3)=2. 4) m=30: 3601 <= q < 3661 => primes 3607,3613,3617,3623,3631,3637,3643,3659: a(30)=8.
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
Programs
-
Mathematica
f[n_] := PrimePi[(2 n + 1)^2 - 2 n - 1] - PrimePi[(2 n)^2]; Table[ f@n, {n, 85}] (* Robert G. Wilson v, May 04 2009 *)
Extensions
More terms from Robert G. Wilson v, May 04 2009
Comments