A210520 Number of cuban primes < 10^(n/2).
0, 0, 1, 2, 4, 6, 11, 17, 28, 42, 64, 105, 173, 267, 438, 726, 1200, 2015, 3325, 5524, 9289, 15659, 26494, 44946, 76483, 129930, 221530, 377856, 645685, 1105802, 1895983, 3254036, 5593440, 9625882, 16578830, 28590987, 49347768, 85253634
Offset: 0
Keywords
Examples
As the smallest cuban primes equal to the difference of two consecutive cubes p = (x+1)^3 - x^3, is 7 for x = 1, and as floor (10^(1/2)) = 3, a(0) = a(1) = 0 and a(2) = 1.
Programs
-
Mathematica
cnt = 0; nxt = 1; t = {0}; Do[p = 3*k*(k + 1) + 1; If[p > nxt, AppendTo[t, cnt]; nxt = nxt*Sqrt[10]]; If[PrimeQ[p], cnt++], {k, 100000}]; t (* T. D. Noe, Jan 29 2013 *)
-
PARI
b(n)={my(s=0,k=0,t=1); while(t<=n, s+=isprime(t); k++; t += 6*k); s} a(n)={b(sqrtint(10^n))} \\ Andrew Howroyd, Jan 14 2020
Formula
a(2*n) = A113478(n). - Andrew Howroyd, Jan 14 2020
Extensions
a(31)-a(37) from Andrew Howroyd, Jan 14 2020
Comments