%I #6 Nov 25 2020 20:07:13
%S 0,1,0,2,2,2,8,8,14,14,44,44,74,98,128,272,326,470,644,932,1106,2234,
%T 2552,3800,4958,7070,9068,12140,20042,24674,34256,45632,61814,80630,
%U 109316,135572,217778,262298,362744,466664,636494,805454,1085804,1375388,1776938,2591762
%N Number of compositions (ordered partitions) of n into distinct parts, the least being 1.
%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%F G.f.: Sum_{k>=1} k! * x^(k*(k + 1)/2) / Product_{j=1..k-1} (1 - x^j).
%e 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].
%p b:= proc(n, i, p) option remember;
%p `if`(n=0, p!, `if`((i-1)*(i+2)/2<n, 0,
%p add(b(n-i*j, i-1, p+j), j=0..min(1, n/i))))
%p end:
%p a:= n-> `if`(n<1, 0, b(n-1$2, 1)):
%p seq(a(n), n=0..55); # _Alois P. Heinz_, Nov 25 2020
%t 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]
%Y Cf. A032020, A096765, A339163, A339164, A339165, A339166.
%K nonn
%O 0,4
%A _Ilya Gutkovskiy_, Nov 25 2020