|
|
A339162
|
|
Number of compositions (ordered partitions) of n into distinct parts, the least being 1.
|
|
8
|
|
|
0, 1, 0, 2, 2, 2, 8, 8, 14, 14, 44, 44, 74, 98, 128, 272, 326, 470, 644, 932, 1106, 2234, 2552, 3800, 4958, 7070, 9068, 12140, 20042, 24674, 34256, 45632, 61814, 80630, 109316, 135572, 217778, 262298, 362744, 466664, 636494, 805454, 1085804, 1375388, 1776938, 2591762
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{k>=1} k! * x^(k*(k + 1)/2) / Product_{j=1..k-1} (1 - x^j).
|
|
EXAMPLE
|
a(6) = 8 because we have [5, 1], [3, 2, 1], [3, 1, 2], [2, 3, 1], [2, 1, 3], [1, 5], [1, 3, 2] and [1, 2, 3].
|
|
MAPLE
|
b:= proc(n, i, p) option remember;
`if`(n=0, p!, `if`((i-1)*(i+2)/2<n, 0,
add(b(n-i*j, i-1, p+j), j=0..min(1, n/i))))
end:
a:= n-> `if`(n<1, 0, b(n-1$2, 1)):
|
|
MATHEMATICA
|
nmax = 45; CoefficientList[Series[Sum[k! x^(k (k + 1)/2)/Product[1 - x^j, {j, 1, k - 1}], {k, 1, nmax}], {x, 0, nmax}], x]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|