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!)
A336032 Number of compositions of n such that the set of parts and the set of multiplicities of parts are disjoint. 2
1, 0, 2, 2, 2, 4, 6, 6, 14, 34, 79, 159, 227, 429, 727, 1146, 1999, 3238, 5018, 8976, 14977, 24768, 38400, 70678, 152535, 295493, 617675, 1404099, 3023086, 6685876, 14230031, 30218806, 62175519, 127820798, 257285277, 516574751, 1021334631, 2009999405, 3917878730 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MAPLE
b:= proc(n, i, p, f, g) option remember; `if`(f intersect g<>{}, 0,
`if`(n=0, p!, `if`(i<1, 0, add(b(n-i*j, i-1, p+j, `if`(j=0,
f, {f[], i}), `if`(j=0, g, {g[], j}))/j!, j=0..n/i))))
end:
a:= n-> b(n$2, 0, {}$2):
seq(a(n), n=0..32);
MATHEMATICA
b[n_, i_, p_, f_, g_] := b[n, i, p, f, g] = If[f ~Intersection~ g != {}, 0,
If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + j,
If[j == 0, f, Union@Append[f, i]],
If[j == 0, g, Union@Append[g, j]]]/j!, {j, 0, n/i}]]]];
a[n_] := b[n, n, 0, {}, {}];
Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Apr 13 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A002722 A261610 A265251 * A093393 A341095 A090858
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 07 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 7 18:53 EDT 2024. Contains 372313 sequences. (Running on oeis4.)