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 A001251 M2031 N0803 #42 Mar 22 2024 18:49:42 %S A001251 0,0,2,12,70,442,3108,24216,208586,1972904,20373338,228346522, %T A001251 2763212980,35926266244,499676669254,7405014187564,116511984902094, %U A001251 1940073930857802,34087525861589564,630296344519286304,12235215845125112122,248789737587365945992 %N A001251 Number of permutations of order n with the length of longest run equal to 3. %D A001251 F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 262. (Terms for n>=13 are incorrect.) %D A001251 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001251 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001251 Alois P. Heinz, <a href="/A001251/b001251.txt">Table of n, a(n) for n = 1..450</a> (first 100 terms from Max Alekseyev) %H A001251 Max A. Alekseyev, <a href="http://arxiv.org/abs/1205.4581">On the number of permutations with bounded runs length</a>, arXiv preprint arXiv:1205.4581 [math.CO], 2012-2013. - From _N. J. A. Sloane_, Oct 23 2012 %H A001251 Richard Ehrenborg and JiYoon Jung, <a href="https://arxiv.org/abs/1312.2027">Descent pattern avoidance</a>, arXiv preprint:1312.2027 [math.CO], 6 Dec 2013. %F A001251 a(n) ~ c * d^n * n!, where d = 0.92403585760753647721113386869798700855648617941... is the root of the equation 8 - 2*sin(sqrt(phi)/d) * (2*sqrt(5*(phi-1)) * cosh(sqrt(phi-1)/d) + 2*sinh(sqrt(phi-1)/d)) + 2*cos(sqrt(phi)/d) * (6*cosh(sqrt(phi-1)/d) + 2*sqrt(5*phi) * sinh(sqrt(phi-1)/d)) = 0, phi = A001622 = (1+sqrt(5))/2 is the golden ratio and c = 1.259371257828351725264434486385284120241474052544197367866029465830756911... - _Vaclav Kotesovec_, Sep 06 2014, updated Aug 18 2018 %t A001251 length = 3; %t A001251 g[u_, o_, t_] := g[u, o, t] = If[u+o == 0, 1, Sum[g[o + j - 1, u - j, 2], {j, 1, u}] + If[t<length, Sum[g[u + j - 1, o - j, t+1], {j, 1, o}], 0]]; %t A001251 b[u_, o_, t_] := b[u, o, t] = If[t == length, g[u, o, t], Sum[b[o + j - 1, u - j, 2], {j, 1, u}] + Sum[b[u + j - 1, o - j, t + 1], {j, 1, o}]]; %t A001251 a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}]; %t A001251 Table[a[n], {n, 1, 30}] (* _Jean-François Alcover_, Aug 18 2018, after _Alois P. Heinz_ *) %Y A001251 Cf. A001250, A001252, A001253, A010026, A211318. %K A001251 nonn %O A001251 1,3 %A A001251 _N. J. A. Sloane_ %E A001251 Corrected and extended by _Max Alekseyev_ at the suggestion of _Sean A. Irvine_, May 04 2012