OFFSET
1,5
COMMENTS
a(n) = A000607(n) for n <= 42.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..1000
FORMULA
G.f.: Product_{k>=1} 1/(1 - x^A109611(k)). - Andrew Howroyd, Dec 28 2017
MATHEMATICA
fQ[n_] := PrimeQ@n && (PrimeQ[n + 2] || 2 == Plus @@ Last /@ FactorInteger[n + 2]); f[n_] := Block[{c = k = 0, l = PartitionsP@n, p = Union /@ IntegerPartitions@n}, While[k++; k < l, If[Union[fQ /@ p[[k]]] == {True}, c++ ]]; c]; lst = {}; Do[ AppendTo[lst, f[n]], {n, 61}]; lst (* or *)
Rest@ CoefficientList[ Series[1/Times @@ (1 - x^Select[ Range@100, fQ@# &]), {x, 0, 61}], x] (* Robert G. Wilson v, Jun 16 2006 *)
PROG
(PARI)
ok(n)={isprime(n) && bigomega(n+2)<3}
{my(n=80); Vec(prod(k=1, n, if(ok(k), 1/(1-x^k) + O(x*x^n), 1))-1, -n)} \\ Andrew Howroyd, Dec 28 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 26 2005
STATUS
approved