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!)
A339381 Number of partitions of n into an odd number of primes (counting 1 as a prime). 5
0, 1, 1, 2, 1, 4, 3, 7, 5, 11, 9, 18, 14, 27, 22, 40, 33, 58, 48, 82, 69, 114, 97, 157, 134, 212, 183, 284, 246, 376, 327, 493, 431, 640, 562, 825, 728, 1056, 934, 1341, 1191, 1694, 1508, 2126, 1899, 2654, 2377, 3297, 2960, 4075, 3668, 5015, 4523, 6145, 5554, 7499 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
FORMULA
G.f.: (1/2) * ((1/(1 - x)) * Product_{k>=1} 1 / (1 - x^prime(k)) - (1/(1 + x)) * Product_{k>=1} 1 / (1 + x^prime(k))).
a(n) = (A034891(n) - A338826(n)) / 2.
EXAMPLE
a(6) = 3 because we have [3, 2, 1], [2, 2, 2] and [2, 1, 1, 1, 1].
MAPLE
b:= proc(n, i, t) option remember; (p->
`if`(n=0, t, `if`(i<0, 0, b(n, i-1, t)+
`if`(p>n, 0, b(n-p, i, 1-t)))))(`if`(i<1, 1, ithprime(i)))
end:
a:= n-> b(n, numtheory[pi](n), 0):
seq(a(n), n=0..60); # Alois P. Heinz, Dec 02 2020
MATHEMATICA
nmax = 55; CoefficientList[Series[(1/2) ((1/(1 - x)) Product[1/(1 - x^Prime[k]), {k, 1, nmax}] - (1/(1 + x)) Product[1/(1 + x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]
CROSSREFS
Sequence in context: A086512 A120751 A054082 * A238544 A101708 A339559
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 02 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 March 28 17:42 EDT 2024. Contains 371254 sequences. (Running on oeis4.)