The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A339382 Number of partitions of n into an even number of distinct primes (counting 1 as a prime). 4
1, 0, 0, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 2, 3, 2, 3, 3, 4, 4, 4, 4, 6, 5, 5, 5, 6, 6, 7, 7, 9, 8, 9, 8, 11, 10, 11, 12, 14, 12, 15, 14, 17, 16, 17, 17, 22, 20, 22, 21, 25, 24, 28, 27, 31, 30, 33, 31, 39, 36, 40, 40, 46, 42, 49, 47, 54, 53, 58, 55, 67, 63, 70, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,9
LINKS
FORMULA
G.f.: (1/2) * ((1 + x) * Product_{k>=1} (1 + x^prime(k)) + (1 - x) * Product_{k>=1} (1 - x^prime(k))).
a(n) = (A036497(n) + A298602(n)) / 2.
EXAMPLE
a(16) = 3 because we have [13, 3], [11, 5] and [7, 5, 3, 1].
MAPLE
s:= proc(n) option remember;
`if`(n<1, n+1, ithprime(n)+s(n-1))
end:
b:= proc(n, i, t) option remember; (p-> `if`(n=0, t,
`if`(n>s(i), 0, b(n, i-1, t)+ `if`(p>n, 0,
b(n-p, i-1, 1-t)))))(`if`(i<1, 1, ithprime(i)))
end:
a:= n-> b(n, numtheory[pi](n), 1):
seq(a(n), n=0..100); # Alois P. Heinz, Dec 02 2020
MATHEMATICA
nmax = 75; CoefficientList[Series[(1/2) ((1 + x) Product[(1 + x^Prime[k]), {k, 1, nmax}] + (1 - x) Product[(1 - x^Prime[k]), {k, 1, nmax}]), {x, 0, nmax}], x]
CROSSREFS
Sequence in context: A230772 A029408 A029415 * A161093 A282904 A299825
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 June 12 17:51 EDT 2024. Contains 373359 sequences. (Running on oeis4.)