A241629 Number of compositions of n with exactly four descents.
5, 37, 189, 751, 2558, 7762, 21577, 55867, 136478, 317416, 707817, 1521755, 3168262, 6410970, 12646075, 24378923, 46028497, 85269218, 155238256, 278130152, 490983234, 854910432, 1469679627, 2496560526, 4193815403, 6971437570, 11474937414, 18712755604
Offset: 12
Keywords
Examples
a(12) = 5: [3,2,1,3,2,1], [2,1,2,1,3,2,1], [2,1,3,2,1,2,1], [3,2,1,2,1,2,1], [2,1,2,1,2,1,2,1].
Links
- Joerg Arndt and Alois P. Heinz, Table of n, a(n) for n = 12..1000
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, convert(series(add(b(n-j, j)* `if`(j coeff(b(n, 0), x, 4): seq(a(n), n=12..50);
-
Mathematica
k = 4; b[n_, i_] := b[n, i] = If[n == 0, 1, Sum[b[n - j, j]* If[j < i, x, 1], {j, n}] + O[x]^(k + 1)]; a[n_] := SeriesCoefficient[b[n, 0], {x, 0, k}]; a /@ Range[12, 50] (* Jean-François Alcover, Aug 27 2021, after Maple code *)