[go: up one dir, main page]

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!)
A336771 Total sum of the left-to-right maxima in all compositions of n into distinct parts. 4
0, 1, 2, 8, 11, 22, 53, 75, 123, 193, 418, 538, 894, 1268, 1950, 3567, 4799, 7143, 10355, 14968, 20701, 36398, 46420, 69071, 94972, 136385, 182522, 259104, 402405, 527090, 741569, 1015491, 1397661, 1880541, 2567202, 3392612, 5153156, 6553844, 9088372, 12040797 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(6) = 53 = 6+4+5+5+3+3+6+4+6+5+6: (1)(2)(3), (1)(3)2, (2)1(3), (2)(3)1, (3)12, (3)21, (2)(4), (4)2, (1)(5), (5)1, (6).
MAPLE
b:= proc(n, i, k, m) option remember; `if`(i<k or n>
(2*i-k+1)*k/2, 0, `if`(n=0, [1, 0], b(n, i-1, k, m)+
(p-> p+[0, p[1]*i/(m+1-k)])(b(n-i, min(n-i, i-1), k-1, m))))
end:
a:= n-> add(b(n$2, k$2)[2]*k!, k=1..floor((sqrt(8*n+1)-1)/2)):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, i_, k_, m_] := b[n, i, k, m] = If[i < k || n >
(2*i - k + 1)*k/2, {0, 0}, If[n == 0, {1, 0}, b[n, i - 1, k, m] +
Function[p, p+{0, p[[1]]*i/(m+1-k)}][b[n-i, Min[n-i, i-1], k-1, m]]]];
a[n_] := Sum[b[n, n, k, k][[2]]*k!, {k, 1, Floor[(Sqrt[8*n + 1] - 1)/2]}];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A090746 A362869 A234924 * A174114 A197540 A089118
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 04 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 August 29 17:19 EDT 2024. Contains 375518 sequences. (Running on oeis4.)