OFFSET
1,2
COMMENTS
The above sequence relies on the strong Goldbach's conjecture that any positive integer is the sum of at most three distinct terms from {1 union primes}.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
EXAMPLE
a(21)=9 as 21 = 1+1+19 = 2+19 = 1+3+17 = 2+2+17 = 1+7+13 = 3+5+13 = 3+7+11 = 5+5+11 = 7+7+7
MATHEMATICA
primeQ[p0_] := If[p0==1, True, PrimeQ[p0]]; SetAttributes[primeQ, Listable]; goldbachcount[p1_] := (parts=IntegerPartitions[p1, 3]; count=0; n=1; While[n<=Length[parts], If[Intersection[Flatten[primeQ[parts[[n]]]]][[1]] == True, count++]; n++]; count); Table[goldbachcount[i], {i, 1, 100}]
Table[Length[Select[#/.(1->2)&/@IntegerPartitions[n, 3], AllTrue[#, PrimeQ]&]], {n, 80}] (* Harvey P. Dale, Jan 11 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Frank M Jackson, Mar 26 2013
STATUS
approved