OFFSET
1,2
REFERENCES
H. Halberstam and H. E. Richert, "Sieve methods", Academic Press, London, New York, San Francisco, 1974.
FORMULA
EXAMPLE
a(1) = 1 because (2*1)^3 = 8 = 3 + 5 uniquely.
a(2) = 5 because (2*2)^3 = 64 = 3 + 61 = 5 + 59 = 11 + 53 = 17 + 47 = 23 + 41.
a(3) = 13 because (2*3)^3 = 216 = 5 + 211 = 17 + 199 = 19 + 197 = 23 + 193 = 37 + 179 = 43 + 173 = 53 + 163 = 59 + 157 = 67 + 149 = 79 + 137 = 89 + 127 = 103 + 113 = 107 + 109.
MAPLE
a:=proc(n) local ct, j: ct:=0: for j from 1 to prevprime((2*n)^3) do if isprime((2*n)^3-ithprime(j))=true then ct:=ct+1 else ct:=ct fi od: ct/2: end: seq(a(n), n=1..40); # execution takes hours - Emeric Deutsch, Apr 17 2006
# Faster alternative
N:= 100: # to get a(1)..a(N)
V:= Vector(8*N^3, datatype=float[8]):
P:= select(isprime, [2, seq(i, i=3..8*N^3, 2)]):
V[P]:= 1:
C:= SignalProcessing:-Convolution(V, V):
seq(round(C[8*n^3-1])/2, n=1..N); # Robert Israel, Jan 24 2018
MATHEMATICA
Table[Count[IntegerPartitions[8*n^3, {2}], _?(AllTrue[#, PrimeQ]&)], {n, 60}] (* The program uses the AllTrue function from Mathematica version 10 *) (*The program will take a long time to run. *) (* Harvey P. Dale, Oct 11 2019 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Apr 01 2006
EXTENSIONS
Corrected and extended by Emeric Deutsch, Apr 17 2006
More terms from Robert Israel, Jan 24 2018
STATUS
approved