login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A336482 Total number of left-to-right maxima in all compositions of n. 5
0, 1, 2, 5, 11, 24, 51, 108, 226, 471, 976, 2015, 4146, 8508, 17418, 35590, 72597, 147868, 300797, 611202, 1240690, 2516268, 5099242, 10326282, 20897848, 42267257, 85442478, 172635651, 348651294, 703836046, 1420315254, 2865122304, 5777735296, 11647641296 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(4) = 11: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4).
MAPLE
b:= proc(n, m, c) option remember; `if`(n=0, c, add(
b(n-j, max(m, j), c+`if`(j>m, 1, 0)), j=1..n))
end:
a:= n-> b(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, Max[m, j], c + If[j > m, 1, 0]], {j, 1, n}]];
a[n_] := b[n, -1, 0];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)
CROSSREFS
Cf. A000254 (the same for permutations of [n]), A225095, A336484, A336511, A336718.
Sequence in context: A090764 A182557 A027934 * A134389 A286945 A371797
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)