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.

A230131 Number of permutations of order n with the length of longest run equal 8.

This page as a plain text file.
%I A230131 #12 Aug 18 2018 08:38:35
%S A230131 2,32,462,6644,98472,1523808,24744720,422335056,7575963254,
%T A230131 142706934722,2819192544786,58323311592602,1261634626792744,
%U A230131 28492765388656632,670804322638496378,16439609940896532018,418816100433422180196,11077009292500273732470
%N A230131 Number of permutations of order n with the length of longest run equal 8.
%H A230131 Alois P. Heinz, <a href="/A230131/b230131.txt">Table of n, a(n) for n = 8..450</a>
%p A230131 g:= proc(u, o, t) option remember; `if`(u+o=0, 1,
%p A230131        add(g(o+j-1, u-j, 2), j=1..u) +`if`(t<8,
%p A230131        add(g(u+j-1, o-j, t+1), j=1..o), 0))
%p A230131     end:
%p A230131 b:= proc(u, o, t) option remember; `if`(t=8, g(u, o, t),
%p A230131        add(b(o+j-1, u-j, 2), j=1..u)+
%p A230131        add(b(u+j-1, o-j, t+1), j=1..o))
%p A230131     end:
%p A230131 a:= n-> add(b(j-1, n-j, 1), j=1..n):
%p A230131 seq(a(n), n=8..30);
%t A230131 length = 8;
%t A230131 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 A230131 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 A230131 a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
%t A230131 Table[a[n], {n, length, 30}] (* _Jean-François Alcover_, Aug 18 2018, after _Alois P. Heinz_ *)
%Y A230131 Column l=8 of A211318.
%Y A230131 A diagonal of A010026.
%K A230131 nonn
%O A230131 8,1
%A A230131 _Alois P. Heinz_, Oct 10 2013