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!)
A322326 Number of compositions of n in which at most one part has even multiplicity. 2
1, 1, 2, 4, 8, 16, 26, 64, 107, 226, 382, 859, 1488, 3124, 5628, 11326, 21629, 42274, 81420, 158002, 309129, 592798, 1181109, 2234319, 4501108, 8461706, 17211219, 32187953, 66018320, 122792362, 253549269, 469715744, 975300728, 1802165555, 3758679309, 6931995005 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(6) = 26: 111111, 11112, 11121, 11211, 12111, 21111, 222, 1113, 1131, 1311, 3111, 123, 132, 213, 231, 312, 321, 33, 114, 141, 411, 24, 42, 15, 51, 6.
MAPLE
b:= proc(n, i, p, t) option remember; `if`(n=0 or i=1, `if`(n>0 and
t and n::even, 0, (n+p)!/n!), b(n, i-1, p, t)+add(`if`(t and
j::even, 0, b(n-i*j, i-1, p+j, t or j::even))/j!, j=1..n/i))
end:
a:= n-> b(n$2, 0, false):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, i_, p_, t_] := b[n, i, p, t] = If[n == 0 || i == 1, If[n > 0 &&
t && EvenQ[n], 0, (n + p)!/n!], b[n, i - 1, p, t] + Sum[If[t &&
EvenQ[j], 0, b[n - i*j, i-1, p+j, t || EvenQ[j]]]/j!, {j, 1, n/i}]];
a[n_] := b[n, n, 0, False];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Mar 05 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A319385 A180249 A060957 * A018826 A342130 A258624
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 03 2018
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 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)