login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A373306
Sum over all complete compositions of n of the element multiset size.
3
0, 1, 2, 7, 13, 30, 73, 157, 345, 743, 1650, 3517, 7593, 16120, 34294, 72683, 153475, 323293, 679231, 1423721, 2977692, 6218395, 12959249, 26970243, 56037071, 116280086, 240953162, 498719275, 1031029386, 2129266321, 4392871427, 9054428894, 18645998093
OFFSET
0,3
COMMENTS
A complete composition of n has element set [k] with k<=n (without gaps).
LINKS
FORMULA
G.f.: Sum_{k>0} d/dy C({1..k},x,y)|y = 1 where C({s},x,y) = Sum_{i in {s}} (C({s}-{i},x,y)*y*x^i)/(1 - Sum_{i in {s}} (y*x^i)) with C({},x,y) = 1. - John Tyler Rascoe, Jun 18 2024
EXAMPLE
a(1) = 1: 1.
a(2) = 2: 11.
a(3) = 7 = 2 + 2 + 3: 12, 21, 111.
a(4) = 13 = 3 + 3 + 3 + 4: 112, 121, 211, 1111.
a(5) = 30 = 3*3 + 4*4 + 5: 122, 212, 221, 1112, 1121, 1211, 2111, 11111.
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, `if`(i=0, [t!, 0], 0),
`if`(i<1 or n<i*(i+1)/2, 0, add((p-> p+[0, p[1]]*j)(
b(n-i*j, i-1, t+j)/j!), j=1..n/i)))
end:
a:= n-> add(b(n, k, 0)[2], k=0..floor((sqrt(1+8*n)-1)/2)):
seq(a(n), n=0..32);
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[i == 0, {t!, 0}, {0, 0}], If[i < 1 || n < i*(i + 1)/2, {0, 0}, Sum[Function[p, p + {0, p[[1]]}*j][b[n - i*j, i - 1, t + j]/j!], {j, 1, n/i}]]];
a[n_] := Sum[b[n, k, 0][[2]], {k, 0, Floor[(Sqrt[1 + 8*n] - 1)/2]}];
Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jun 08 2024, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 31 2024
STATUS
approved