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.

A230132 Number of permutations of order n with the length of longest run equal 9.

This page as a plain text file.
%I A230132 #12 Aug 18 2018 08:38:28
%S A230132 2,36,574,9024,145080,2419872,42129360,767370240,14631376500,
%T A230132 291914163322,6088804487138,132624737931726,3012939864521998,
%U A230132 71296697740927172,1755099895042102380,44889002698811118240,1191389820174200208622,32774409073391657243622
%N A230132 Number of permutations of order n with the length of longest run equal 9.
%H A230132 Alois P. Heinz, <a href="/A230132/b230132.txt">Table of n, a(n) for n = 9..450</a>
%p A230132 g:= proc(u, o, t) option remember; `if`(u+o=0, 1,
%p A230132        add(g(o+j-1, u-j, 2), j=1..u) +`if`(t<9,
%p A230132        add(g(u+j-1, o-j, t+1), j=1..o), 0))
%p A230132     end:
%p A230132 b:= proc(u, o, t) option remember; `if`(t=9, g(u, o, t),
%p A230132        add(b(o+j-1, u-j, 2), j=1..u)+
%p A230132        add(b(u+j-1, o-j, t+1), j=1..o))
%p A230132     end:
%p A230132 a:= n-> add(b(j-1, n-j, 1), j=1..n):
%p A230132 seq(a(n), n=9..30);
%t A230132 length = 9;
%t A230132 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 A230132 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 A230132 a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
%t A230132 Table[a[n], {n, length, 30}] (* _Jean-François Alcover_, Aug 18 2018, after _Alois P. Heinz_ *)
%Y A230132 Column l=9 of A211318.
%Y A230132 A diagonal of A010026.
%K A230132 nonn
%O A230132 9,1
%A A230132 _Alois P. Heinz_, Oct 10 2013