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!)
A336770 Total sum of the left-to-right minima in all compositions of n into distinct parts. 4
0, 1, 2, 7, 9, 18, 39, 54, 83, 133, 268, 337, 542, 754, 1148, 2058, 2689, 3909, 5607, 7945, 10965, 19024, 23838, 34840, 47332, 67121, 89006, 125571, 194513, 250634, 349001, 473018, 644107, 860595, 1164018, 1532321, 2327654, 2923772, 4022746, 5290310, 7188111 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
a(6) = 39 = 1+1+3+3+4+6+2+6+1+6+6: (1)23, (1)32, (2)(1)3, (2)3(1), (3)(1)2, (3)(2)(1), (2)4, (4)(2), (1)5, (5)(1), (6).
MAPLE
b:= proc(n, i, k) option remember; `if`(i<k or n>
(2*i-k+1)*k/2, 0, `if`(n=0, [1, 0], b(n, i-1, k)+
(p-> p+[0, p[1]*i/k])(b(n-i, min(n-i, i-1), k-1))))
end:
a:= n-> add(b(n$2, k)[2]*k!, k=1..floor((sqrt(8*n+1)-1)/2)):
seq(a(n), n=0..40);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[i < k || n > (2i - k + 1) k/2, {0, 0}, If[n == 0, {1, 0}, b[n, i - 1, k] + Function[p, p + {0, p[[1]] i/k}][b[n - i, Min[n - i, i - 1], k - 1]]]];
a[n_] := Sum[b[n, n, k][[2]] k!, {k, 1, Floor[(Sqrt[8n + 1] - 1)/2]}];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A079326 A055673 A177737 * A361706 A293645 A293646
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 April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)