A032022 Number of compositions (ordered partitions) of n into distinct parts >= 2.
1, 0, 1, 1, 1, 3, 3, 5, 5, 13, 13, 21, 27, 35, 65, 79, 109, 147, 207, 245, 449, 517, 745, 957, 1335, 1691, 2237, 3463, 4273, 5787, 7611, 10109, 13061, 17413, 21493, 32853, 39627, 53675, 68321, 91663, 114997, 152811, 192063, 245885, 346649, 428869, 557305
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- C. G. Bower, Transforms (2)
Crossrefs
Cf. A032020.
Programs
-
Maple
b:= proc(n, i) option remember; local s; s:= i*(i+1)/2-1; `if`(n=0, [1], `if`(i<2 or n>s, [], zip((x, y)->x+y, b(n, i-1), [0, `if`(i>n, [], b(n-i, i-1))[]], 0))) end: a:= proc(n) option remember; local l; l:= b(n$2); add(l[i]*(i-1)!, i=1..nops(l)) end: seq(a(n), n=0..70); # Alois P. Heinz, Nov 09 2012
-
Mathematica
zip = With[{m = Max[Length[#1], Length[#2]]}, PadRight[#1, m] + PadRight[#2, m]]&; b[n_, i_] := b[n, i] = With[{s = i*(i+1)/2-1}, If[n == 0, {1}, If[i<2 || n>s, {}, zip[ b[n, i-1], Join[{0}, If[i>n, {}, b[n-i, i - 1]]]]]]]; a[n_] := a[n] = Module[{l = b[n, n]}, Sum[l[[i]]*(i-1)!, {i, 1, Length[l]}]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Feb 13 2017, after Alois P. Heinz *)
Formula
"AGK" (ordered, elements, unlabeled) transform of 0, 1, 1, 1...
G.f.: sum(i>=0, i! * x^((i^2+3*i)/2) / prod(j=1..i, 1-x^j ) ). - Vladeta Jovovic, May 21 2006
Extensions
Prepended a(0)=1, Joerg Arndt, Oct 20 2012