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 A336482 #34 Mar 28 2025 18:19:53 %S A336482 0,1,2,5,11,24,51,108,226,471,976,2015,4146,8508,17418,35590,72597, %T A336482 147868,300797,611202,1240690,2516268,5099242,10326282,20897848, %U A336482 42267257,85442478,172635651,348651294,703836046,1420315254,2865122304,5777735296,11647641296 %N A336482 Total number of left-to-right maxima in all compositions of n. %H A336482 Alois P. Heinz, <a href="/A336482/b336482.txt">Table of n, a(n) for n = 0..2000</a> %F A336482 a(n) = Sum_{k>0} A382312(n,k)*k. - _John Tyler Rascoe_, Mar 22 2025 %e A336482 a(4) = 11: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4). %p A336482 b:= proc(n, m, c) option remember; `if`(n=0, c, add( %p A336482 b(n-j, max(m, j), c+`if`(j>m, 1, 0)), j=1..n)) %p A336482 end: %p A336482 a:= n-> b(n, -1, 0): %p A336482 seq(a(n), n=0..50); %t A336482 b[n_, m_, c_] := b[n, m, c] = If[n == 0, c, Sum[ %t A336482 b[n - j, Max[m, j], c + If[j > m, 1, 0]], {j, 1, n}]]; %t A336482 a[n_] := b[n, -1, 0]; %t A336482 Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Mar 04 2022, after _Alois P. Heinz_ *) %o A336482 (PARI) %o A336482 T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h= prod(i=1,N, 1 + y*x^i *(1-x)/(1-2*x+x^(i+1)))); h} %o A336482 P_xy(N) = Pol(T_xy(N), {x}) %o A336482 B_x(N) = {my(cx = deriv(P_xy(N), y), y=1); Vecrev(eval(cx))} %o A336482 B_x(30) \\ _John Tyler Rascoe_, Mar 22 2025 %Y A336482 Cf. A000254 (the same for permutations of [n]), A225095, A336484, A336511, A336718, A382312. %K A336482 nonn %O A336482 0,3 %A A336482 _Alois P. Heinz_, Jul 22 2020