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!)
A339432 Number of compositions (ordered partitions) of n into an even number of distinct primes. 2
1, 0, 0, 0, 0, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 4, 24, 4, 2, 4, 26, 4, 48, 6, 50, 28, 48, 28, 72, 6, 74, 52, 98, 54, 96, 56, 120, 98, 122, 102, 864, 104, 146, 150, 866, 150, 1584, 154, 938, 200, 1632, 246, 3072, 226, 1706, 990, 3864, 1038, 4560, 348, 3914, 1828, 4634, 1162, 7488 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
EXAMPLE
a(16) = 4 because we have [13, 3], [3, 13], [11, 5] and [5, 11].
MAPLE
b:= proc(n, i, p) option remember; `if`(n=0, irem(1+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[1 + 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: A023556 A238783 A044944 * A044945 A238005 A296509
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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)