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 A317328 #13 Apr 15 2022 11:15:41 %S A317328 0,1,2,10,41,238,1560,11822,99884,944951,9851550,112297557,1389182296, %T A317328 18548151140,265854443194,4071965025912,66379311227650, %U A317328 1147606112273168,20974771814051529,404111977603746584,8186206878478673819,173948483818885099616,3868878742247603336434,89892706223315981903289 %N A317328 Total number of distinct run lengths summed over all permutations of [n] with exactly k distinct lengths of increasing runs. %H A317328 Alois P. Heinz, <a href="/A317328/b317328.txt">Table of n, a(n) for n = 0..60</a> %F A317328 a(n) = Sum_{k=0..floor((sqrt(1+8*n)-1)/2)} k * A317327(n,k). %p A317328 b:= proc(u, o, t, s) option remember; %p A317328 `if`(u+o=0, x^(nops(s union {t})-1), %p A317328 add(b(u-j, o+j-1, 1, s union {t}), j=1..u)+ %p A317328 add(b(u+j-1, o-j, t+1, s), j=1..o)) %p A317328 end: %p A317328 a:= n-> (p-> add(coeff(p, x, i)*i, i=0..degree(p)))(b(n, 0$2, {})): %p A317328 seq(a(n), n=0..16); %t A317328 b[u_, o_, t_, s_] := b[u, o, t, s] = %t A317328 If[u + o == 0, x^(Length[s ~Union~ {t}] - 1), %t A317328 Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}], {j, 1, u}] + %t A317328 Sum[b[u + j - 1, o - j, t + 1, s], {j, 1, o}]]; %t A317328 a[n_] := Function[p, Sum[Coefficient[p, x, i]*i, {i, 0, Exponent[p, x]}]][ %t A317328 b[n, 0, 0, {}]]; %t A317328 Table[a[n], {n, 0, 16}] (* _Jean-François Alcover_, Apr 15 2022, after _Alois P. Heinz_ *) %Y A317328 Cf. A317327. %K A317328 nonn %O A317328 0,3 %A A317328 _Alois P. Heinz_, Jul 25 2018