login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 19 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A136488 A045621 A026655 * A244398 A100938 A018004
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2020
STATUS
approved