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!)
A339383 Number of partitions of n into an odd number of distinct primes (counting 1 as a prime). 4
0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 6, 6, 5, 7, 6, 8, 7, 8, 9, 10, 9, 12, 11, 12, 11, 14, 14, 16, 15, 17, 17, 20, 17, 21, 22, 24, 22, 27, 25, 30, 28, 31, 31, 36, 33, 40, 39, 42, 40, 47, 46, 53, 49, 55, 54, 63, 58, 68, 67, 73 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
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(21) = 4 because we have [17, 3, 1], [13, 7, 1], [13, 5, 3] and [11, 7, 3].
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), 0):
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: A029420 A194822 A029405 * A198260 A029350 A166597
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 May 10 07:40 EDT 2024. Contains 372358 sequences. (Running on oeis4.)