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”).

A339409
Number of compositions (ordered partitions) of n into an odd number of primes.
2
0, 0, 1, 1, 0, 1, 1, 4, 3, 4, 7, 12, 19, 22, 32, 53, 80, 120, 160, 245, 368, 553, 800, 1164, 1736, 2588, 3813, 5598, 8226, 12228, 18060, 26657, 39221, 57945, 85656, 126506, 186584, 275307, 406514, 600488, 886255, 1308088, 1930648, 2850861, 4208743, 6212824, 9170440, 13538025
OFFSET
0,8
FORMULA
G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^prime(k)) - 1 / (1 + Sum_{k>=1} x^prime(k))).
EXAMPLE
a(8) = 3 because we have [3, 3, 2], [3, 2, 3] and [2, 3, 3].
MAPLE
b:= proc(n, t) option remember; `if`(n=0, t, add(
b(n-ithprime(j), 1-t), j=1..numtheory[pi](n)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..55); # Alois P. Heinz, Dec 03 2020
MATHEMATICA
nmax = 47; CoefficientList[Series[(1/2) (1/(1 - Sum[x^Prime[k], {k, 1, nmax}]) - 1/(1 + Sum[x^Prime[k], {k, 1, nmax}])), {x, 0, nmax}], x]
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 03 2020
STATUS
approved