login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,8
LINKS
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
Sequence in context: A289672 A359864 A361849 * A075246 A257840 A132984
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 03 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 28 03:42 EDT 2024. Contains 373761 sequences. (Running on oeis4.)