OFFSET
0,4
COMMENTS
A cuban prime has the form (x+1)^3 - x^3, which equals 3x*(x+1) + 1 (A002407).
FORMULA
a(2*n) = A113478(n). - Andrew Howroyd, Jan 14 2020
EXAMPLE
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.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Pletser, Jan 26 2013
EXTENSIONS
a(31)-a(37) from Andrew Howroyd, Jan 14 2020
STATUS
approved