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!)
A339433 Number of compositions (ordered partitions) of n into an odd number of distinct primes. 2
0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 6, 1, 6, 1, 6, 6, 6, 1, 12, 7, 12, 12, 12, 13, 12, 12, 18, 18, 132, 19, 132, 25, 18, 24, 252, 30, 258, 31, 264, 156, 486, 37, 498, 157, 504, 276, 738, 175, 738, 288, 750, 528, 984, 307, 1218, 666, 1110, 780, 6378, 679, 6618, 799, 1716, 1272 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
LINKS
EXAMPLE
a(10) = 6 because we have [5, 3, 2], [5, 2, 3], [3, 5, 2], [3, 2, 5], [2, 5, 3] and [2, 3, 5].
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!, (s->
`if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(ithprime(i)))
end:
a:= n-> b(n, 1, 0):
seq(a(n), n=0..70); # Alois P. Heinz, Dec 04 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, Function[s, If[s > n, 0, b[n, i + 1, p] + b[n - s, i + 1, p + 1]]][Prime[i]]];
a[n_] := b[n, 1, 0];
Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 26 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A010687 A176355 A109918 * A263494 A096956 A326126
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 04 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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)