cp's OEIS Frontend

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.

A336511 Total sum of the left-to-right maxima in all compositions of n.

This page as a plain text file.
%I A336511 #18 Mar 04 2022 08:34:30
%S A336511 0,1,3,9,22,52,117,260,565,1217,2593,5487,11538,24146,50316,104490,
%T A336511 216337,446754,920506,1892904,3885719,7964162,16300646,33321640,
%U A336511 68038796,138784403,282824924,575866839,1171612786,2381938742,4839331484,9825841526,19938975797
%N A336511 Total sum of the left-to-right maxima in all compositions of n.
%H A336511 Alois P. Heinz, <a href="/A336511/b336511.txt">Table of n, a(n) for n = 0..1000</a>
%e A336511 a(4) = 1 + 1 + 2 + 1 + 2 + 2 + 2 + 1 + 3 + 3 + 4 = 22: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4).
%p A336511 b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p-> [0,
%p A336511       `if`(j>m, j*p[1], 0)]+p)(b(n-j, max(m, j))), j=1..n))
%p A336511     end:
%p A336511 a:= n-> b(n, -1)[2]:
%p A336511 seq(a(n), n=0..50);
%t A336511 b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, {0,
%t A336511      If[j > m, j*p[[1]], 0]} + p][b[n - j, Max[m, j]]], {j, 1, n}]];
%t A336511 a[n_] := b[n, -1][[2]];
%t A336511 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Mar 04 2022, after _Alois P. Heinz_ *)
%Y A336511 Cf. A001705 (the same for permutations of [n]), A336482, A336512, A336516, A336771.
%K A336511 nonn
%O A336511 0,3
%A A336511 _Alois P. Heinz_, Jul 23 2020