OFFSET
0,8
COMMENTS
Number of compositions (ordered partitions) of n into primes congruent to 1 or 2 mod 4.
Conjecture: every number > 16 is the sum of at most 4 primes of form x^2 + y^2.
FORMULA
G.f.: 1/(1 - Sum_{k>=1} x^A002313(k)).
EXAMPLE
a(12) = 4 because we have [5, 5, 2], [5, 2, 5], [2, 2, 5] and [2, 2, 2, 2, 2, 2].
MATHEMATICA
nmax = 60; CoefficientList[Series[1/(1 - Sum[Boole[SquaresR[2, k] != 0 && PrimeQ[k]] x^k, {k, 1, nmax}]), {x, 0, nmax}], x]
PROG
(PARI) Vec(1/(1 - sum(k=1, 60, (isprime(k) && k%4<3)*x^k)) + O(x^61)) \\ Indranil Ghosh, Mar 15 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 25 2017
STATUS
approved