OFFSET
1,1
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
FORMULA
A001043(x)=m^3 for some m; if p(x+1)+p(x) is a cube, then x is here.
a(n) = primepi(A061308(n)). - Michel Marcus, Oct 24 2014
EXAMPLE
28 is in the list because prime(28)+prime(29) = 107+109 =216 = 6^3.
n=1291597: prime(1291597)+prime(1291598) = 344*344*344.
MATHEMATICA
PrevPrim[n_] := Block[{k = n - 1}, While[ !PrimeQ[k], k-- ]; k]; NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; Do[ If[ n^3 == PrevPrim[Floor[(n^3)/2]] + NextPrim[Floor[(n^3)/2]], Print[ PrimePi[ Floor[(n^3)/2]]]], {n, 2, 10^4}]
Flatten[Position[Total/@Partition[Prime[Range[20000000]], 2, 1], _?(IntegerQ[ Surd[ #, 3]]&)]] (* Harvey P. Dale, May 28 2014 *)
PROG
(Python)
from __future__ import division
from sympy import isprime, prevprime, nextprime, primepi
A071220_list, i = [], 2
while i < 10**6:
n = i**3
m = n//2
if not isprime(m) and prevprime(m) + nextprime(m) == n:
A071220_list.append(primepi(m))
i += 1 # Chai Wah Wu, May 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 17 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Oct 07 2002
STATUS
approved