A241626 Number of compositions of n with exactly one descent.
1, 3, 9, 19, 41, 77, 142, 247, 421, 689, 1113, 1750, 2712, 4128, 6208, 9201, 13502, 19585, 28158, 40109, 56689, 79486, 110703, 153129, 210536, 287752, 391172, 528961, 711837, 953429, 1271421, 1688293, 2232899, 2941798, 3861621, 5051174, 6584958, 8556655
Offset: 3
Keywords
Examples
a(3) = 1: [2,1]. a(4) = 3: [3,1], [1,2,1], [2,1,1]. a(5) = 9: [3,2], [4,1], [2,1,2], [3,1,1], [1,3,1], [2,2,1], [2,1,1,1], [1,1,2,1], [1,2,1,1].
Links
- Joerg Arndt, Alois P. Heinz and Vaclav Kotesovec, Table of n, a(n) for n = 3..4000 (first 1000 terms from Joerg Arndt and Alois P. Heinz)
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, 1): seq(a(n), n=3..50);
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0, 1, Normal[Series[Sum[b[n - j, j]* If[j < i, x, 1], {j, 1, n}], {x, 0, 2}]]]; a[n_] := Coefficient[b[n, 0], x, 1]; Table[a[n], {n, 3, 50}] (* Jean-François Alcover, Feb 06 2015, after Maple *)