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 A244295 #16 Aug 25 2021 13:04:45 %S A244295 2,3,14,14,69,97,251,671,1847,2111,12869,33461,58343,189045,841125, %T A244295 2207347,6651215,12781755,73096191,308508927,904926489,1727792245, %U A244295 7638794959,44017642189,177969495449,522668483639,1662245807549,4496811662189,32142974215379 %N A244295 Number of standard Young tableaux with n cells such that the lengths of the first and the last row differ by 1. %C A244295 Also the number of ballot sequences of length n such that the multiplicities of the largest and the smallest value differ by 1. %H A244295 Alois P. Heinz, <a href="/A244295/b244295.txt">Table of n, a(n) for n = 3..400</a> %H A244295 Wikipedia, <a href="https://en.wikipedia.org/wiki/Young_tableau">Young tableau</a> %e A244295 a(4) = 3: %e A244295 [1 2] [1 3] [1 4] %e A244295 [3] [2] [2] %e A244295 [4] [4] [3] %p A244295 h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+ %p A244295 add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n) %p A244295 end: %p A244295 g:= proc(n, i, l) local j; `if`(n=0 or i<1, 0, `if`(l<>[] and %p A244295 l[1]-i=1, `if`(irem(n, i, 'j')=0, h([l[], i$j]), 0), %p A244295 add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))) %p A244295 end: %p A244295 a:= n-> g(n, n, []): %p A244295 seq(a(n), n=3..35); %t A244295 h[l_] := With[{n = Length[l]}, Total[l]!/Product[Product[1+l[[i]]-j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, l[[i]]}], {i, n}]]; %t A244295 g[n_, i_, l_] := Module[{j}, If[n == 0 || i<1, 0, If[l != {} && l[[1]]-i == 1, If[j = Quotient[n, i]; Mod[n, i] == 0, h[Join[l, Table[i, {j}]]], 0], Sum[g[n-i*j, i-1, Join[l, Table[i, {j}]]], {j, 0, n/i}]]]]; %t A244295 a[n_] := g[n, n, {}]; %t A244295 Table[a[n], {n, 3, 35}] (* _Jean-François Alcover_, Aug 25 2021, after Maple code *) %Y A244295 Column k=1 of A238707. %K A244295 nonn %O A244295 3,1 %A A244295 _Joerg Arndt_ and _Alois P. Heinz_, Jun 25 2014