This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A336512 #18 Mar 07 2022 07:55:06 %S A336512 0,1,3,8,17,38,78,162,330,672,1355,2736,5503,11058,22191,44507,89198, %T A336512 178697,357852,716440,1434041,2869935,5742801,11490298,22988084, %U A336512 45988166,91995547,184021931,368093352,736266262,1472660452,2945526806,5891385159,11783304479 %N A336512 Total sum of the left-to-right minima in all compositions of n. %H A336512 Alois P. Heinz, <a href="/A336512/b336512.txt">Table of n, a(n) for n = 0..1000</a> %e A336512 a(4) = 1 + 1 + 1 + 2 + 1 + 2 + 1 + 3 + 1 + 4 = 17: (1)111, (1)12, (1)21, (2)(1)1, (2)2, (1)3, (3)(1), (4). %p A336512 b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0, %p A336512 `if`(j<m, j*p[1], 0)]+p)(b(n-j, min(m, j))), j=1..n)) %p A336512 end: %p A336512 a:= n-> b(n, n+1)[2]: %p A336512 seq(a(n), n=0..50); %t A336512 b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0, %t A336512 If[j < m, j*p[[1]], 0]} + p][b[n - j, Min[m, j]]], {j, 1, n}]]; %t A336512 a[n_] := b[n, n + 1][[2]]; %t A336512 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Mar 07 2022, after _Alois P. Heinz_ *) %Y A336512 Cf. A001563 (the same for permutations of [n]), A336484, A336511, A336516, A336770. %K A336512 nonn %O A336512 0,3 %A A336512 _Alois P. Heinz_, Jul 23 2020