cp's OEIS Frontend

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.

A001253 Number of permutations of order n with the length of longest run equal to 5.

This page as a plain text file.
%I A001253 M2123 N0840 #41 Mar 22 2024 19:18:35
%S A001253 0,0,0,0,2,20,198,2048,22468,264538,3340962,45173518,652209564,
%T A001253 10024669626,163546399460,2823941647390,51468705947590,
%U A001253 987671243816650,19909066390361346,420650676776338140,9297308938203169622,214562999510569012168
%N A001253 Number of permutations of order n with the length of longest run equal to 5.
%D A001253 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 A001253 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001253 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001253 Alois P. Heinz, <a href="/A001253/b001253.txt">Table of n, a(n) for n = 1..450</a> (first 100 terms from Max Alekseyev)
%H A001253 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
%t A001253 length = 5;
%t A001253 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 A001253 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 A001253 a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
%t A001253 Table[a[n], {n, 1, 30}] (* _Jean-François Alcover_, Aug 18 2018, after _Alois P. Heinz_ *)
%Y A001253 Cf. A001250, A001251, A001252, A010026, A211318.
%K A001253 nonn
%O A001253 1,5
%A A001253 _N. J. A. Sloane_
%E A001253 Corrected and extended by _Max Alekseyev_ at the suggestion of _Sean A. Irvine_, May 04 2012