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

%I #19 Jul 12 2021 04:16:23

%S 0,1,2,7,9,18,39,54,83,133,268,337,542,754,1148,2058,2689,3909,5607,

%T 7945,10965,19024,23838,34840,47332,67121,89006,125571,194513,250634,

%U 349001,473018,644107,860595,1164018,1532321,2327654,2923772,4022746,5290310,7188111

%N Total sum of the left-to-right minima in all compositions of n into distinct parts.

%H Alois P. Heinz, <a href="/A336770/b336770.txt">Table of n, a(n) for n = 0..1000</a>

%e 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).

%p b:= proc(n, i, k) option remember; `if`(i<k or n>

%p (2*i-k+1)*k/2, 0, `if`(n=0, [1, 0], b(n, i-1, k)+

%p (p-> p+[0, p[1]*i/k])(b(n-i, min(n-i, i-1), k-1))))

%p end:

%p a:= n-> add(b(n$2, k)[2]*k!, k=1..floor((sqrt(8*n+1)-1)/2)):

%p seq(a(n), n=0..40);

%t 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]]]];

%t a[n_] := Sum[b[n, n, k][[2]] k!, {k, 1, Floor[(Sqrt[8n + 1] - 1)/2]}];

%t Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Jul 12 2021, after _Alois P. Heinz_ *)

%Y Cf. A000009, A000254, A003056, A032020, A336512, A336718, A336771.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Aug 04 2020

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 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)