login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230129 Number of permutations of order n with the length of longest run equal 6. 3
2, 24, 274, 3204, 39420, 514296, 7137818, 105318770, 1649355338, 27356466626, 479446719522, 8858271760146, 172151975433756, 3511580514677006, 75032190827549478, 1676210011258705592, 39082263260517298658, 949481770375318700914, 23998362106238648271276 (list; graph; refs; listen; history; text; internal format)
OFFSET
6,1
LINKS
MAPLE
g:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(g(o+j-1, u-j, 2), j=1..u) +`if`(t<6,
add(g(u+j-1, o-j, t+1), j=1..o), 0))
end:
b:= proc(u, o, t) option remember; `if`(t=6, g(u, o, t),
add(b(o+j-1, u-j, 2), j=1..u)+
add(b(u+j-1, o-j, t+1), j=1..o))
end:
a:= n-> add(b(j-1, n-j, 1), j=1..n):
seq(a(n), n=6..30);
MATHEMATICA
length = 6;
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]];
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}]];
a[n_] := Sum[b[j - 1, n - j, 1], {j, 1, n}];
Table[a[n], {n, length, 30}] (* Jean-François Alcover, Aug 18 2018, after Alois P. Heinz *)
CROSSREFS
Column l=6 of A211318.
A diagonal of A010026.
Sequence in context: A300399 A221082 A002006 * A355951 A065101 A052739
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Oct 10 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 1 23:54 EDT 2024. Contains 372178 sequences. (Running on oeis4.)