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 A215562 #27 Mar 07 2023 08:40:03 %S A215562 1,7,403,40350,5223915,783353872,129141898872,22745605840236, %T A215562 4206489449301315,807660192541534200,159752979289765273698, %U A215562 32371149339259024610992,6692030708288364864188400,1406943391115083641966787200,300084647544974128326709244080 %N A215562 Number of permutations of n indistinguishable copies of 1..4 with every partial sum <= the same partial sum averaged over all permutations. %H A215562 Alois P. Heinz and Vaclav Kotesovec, <a href="/A215562/b215562.txt">Table of n, a(n) for n = 0..133</a> (terms 0..60 from Alois P. Heinz) %H A215562 M. Kauers and C. Koutschan, <a href="https://arxiv.org/abs/2303.02793">Some D-finite and some possibly D-finite sequences in the OEIS</a>, arXiv:2303.02793 [cs.SC], 2023. %F A215562 a(n) ~ (phi - sqrt(phi)) * 2^(8*n-1/2) / (Pi^(3/2) * n^(5/2)), where phi = (1+sqrt(5))/2. - _Vaclav Kotesovec_, Jan 31 2015 %e A215562 a(0) = 1: the empty permutation. %e A215562 a(1) = 7: (1,2,3,4), (1,2,4,3), (1,3,2,4), (1,4,2,3), (2,1,3,4), (2,1,4,3), (2,3,1,4). %e A215562 a(2) = 403: (1,1,2,2,3,3,4,4), (1,1,2,2,3,4,3,4), ..., (2,3,2,3,1,1,4,4), (2,3,2,3,1,4,1,4). %p A215562 b:= proc(l) option remember; local m, n, g; %p A215562 m, n:= nops(l), add(i, i=l); %p A215562 g:= add(i*l[i], i=1..m)-(m+1)/2*(n-1); %p A215562 `if`(n<2, 1, add(`if`(l[i]>0 and i<=g, %p A215562 b(subsop(i=l[i]-1, l)), 0), i=1..m)) %p A215562 end: %p A215562 a:= n-> b([n$4]): %p A215562 seq(a(n), n=0..15); %t A215562 b[l_] := b[l] = Module[{m, n, g}, {m, n} = {Length[l], Total[l]}; g = Sum[i*l[[i]], {i, 1, m}] - (m + 1)/2*(n - 1); If[n < 2, 1, Sum[If[l[[i]] > 0 && i <= g, b[ReplacePart[l, i -> l[[i]] - 1]], 0], {i, 1, m}]]]; %t A215562 a[k_] := b[Array[k&, 4]]; %t A215562 a /@ Range[0, 15] (* _Jean-François Alcover_, Dec 18 2020, after _Alois P. Heinz_ *) %Y A215562 Row n=4 of A215561. %K A215562 nonn %O A215562 0,2 %A A215562 _Alois P. Heinz_, Aug 16 2012