login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A341982
Number of ways to write n as an ordered sum of 2 primes (counting 1 as a prime).
9
1, 2, 3, 2, 3, 2, 4, 2, 3, 0, 4, 2, 5, 2, 4, 0, 6, 2, 6, 2, 5, 0, 8, 2, 5, 0, 4, 0, 8, 2, 6, 2, 7, 0, 8, 0, 5, 2, 6, 0, 10, 2, 8, 2, 7, 0, 12, 2, 8, 0, 6, 0, 12, 2, 6, 0, 7, 0, 14, 2, 7, 2, 10, 0, 12, 0, 6, 2, 10, 0, 14, 2, 11, 2, 10, 0, 14, 0, 10, 2, 9, 0, 18, 2, 9, 0, 8
OFFSET
2,2
LINKS
FORMULA
G.f.: ( x + Sum_{k>=1} x^prime(k) )^2.
MAPLE
b:= proc(n) option remember; series(`if`(n=0, 1, x*add(
`if`(j=1 or isprime(j), b(n-j), 0), j=1..n)), x, 3)
end:
a:= n-> coeff(b(n), x, 2):
seq(a(n), n=2..88); # Alois P. Heinz, Feb 24 2021
MATHEMATICA
nmax = 88; CoefficientList[Series[(x + Sum[x^Prime[k], {k, 1, nmax}])^2, {x, 0, nmax}], x] // Drop[#, 2] &
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 24 2021
STATUS
approved