A066883 Number of primes in the interval [p(n), p(n)^2] minus p(n), where p(n) is the n-th prime.
0, 0, 2, 5, 15, 21, 38, 46, 68, 108, 121, 171, 210, 227, 268, 341, 412, 441, 524, 585, 612, 711, 781, 888, 1042, 1126, 1165, 1247, 1286, 1381, 1720, 1814, 1972, 2018, 2306, 2361, 2536, 2715, 2838, 3029, 3217, 3290, 3635, 3709, 3848, 3920, 4370, 4836
Offset: 1
References
- Paulo Ribenboim, The New Book of Prime Number Records, 3rd ed., 1995, Springer, pp. 397-398
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
- Carlos Rivera, The prime puzzles & problems connection, conjecture 26
Programs
-
BASIC
20 for Y=1 to 140 30 A=nxtprm(A):B=A^2 40 for X=A to B 50 if X=prmdiv(X) then C=C+1 60 next X 70 print A; C; C-A; "-"; 80 C=0 90 next Y
-
Mathematica
a[n_] := PrimePi[(p=Prime[n])^2]-PrimePi[p-1]-p
-
PARI
{ for (n=1, 1000, a=primepi((p=prime(n))^2) - primepi(p - 1) - p; write("b066883.txt", n, " ", a) ) } \\ Harry J. Smith, Apr 04 2010
Extensions
Edited by Dean Hickerson, Jun 08 2002
Comments