|
|
A336484
|
|
Total number of left-to-right minima in all compositions of n.
|
|
3
|
|
|
0, 1, 2, 5, 10, 22, 45, 93, 190, 387, 783, 1583, 3191, 6422, 12907, 25916, 51993, 104245, 208902, 418466, 837994, 1677694, 3358127, 6720661, 13448413, 26908246, 53834890, 107699435, 215446685, 430970500, 862065453, 1724331779, 3448987855, 6898499386
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 10: (1)111, (1)12, (1)21, (2)(1)1, (2)2, (1)3, (3)(1), (4).
|
|
MAPLE
|
b:= proc(n, m, c) option remember; `if`(n=0, c, add(
b(n-j, min(m, j), c+`if`(j<m, 1, 0)), j=1..n))
end:
a:= n-> b(n, n+1, 0):
seq(a(n), n=0..50);
|
|
MATHEMATICA
|
b[n_, m_, c_] := b[n, m, c] = If[n == 0, c, Sum[
b[n - j, Min[m, j], c + If[j < m, 1, 0]], {j, 1, n}]];
a[n_] := b[n, n+1, 0];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|