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!)
A227850 Number of Dyck paths of semilength n*(4*n+1) in which the run length sequence is a permutation of {1,...,4*n}. 3
1, 4, 1248, 5401472, 114070692352, 7593330670240768 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(1) = 4: UUDUUUDDDD (2134), UUUDUUDDDD (3124), UUUUDDUDDD (4213), UUUUDDDUDD (4312).
MAPLE
h:= proc(n, s) option remember;
`if`(n>add(sort([s[]], `>`)[i], i=1..(nops(s)+1)/2), 0,
add(g(n-i, s minus {i}), i=select(x-> x<=n, s)))
end:
g:= proc(n, s) option remember;
`if`(s={}, `if`(n=0, 1, 0), add(h(n+i, s minus {i}), i=s))
end:
a:= n-> g(0, {$1..4*n}):
seq(a(n), n=0..3);
MATHEMATICA
h[n_, s_] := h[n, s] = If[n > Sum[Sort[s, Greater][[i]], {i, 1, (Length[s] + 1)/2}], 0, Sum[g[n - i, s ~Complement~ {i}], {i, Select[s, # <= n&]}] ];
g[n_, s_] := g[n, s] = If[s == {}, If[n == 0, 1, 0], Sum[h[n + i, s ~Complement~ {i}], {i, s}]];
a[n_] := g[0, Range[4*n]];
Table[a[n], {n, 0, 4}] (* Jean-François Alcover, Apr 23 2016, translated from Maple *)
CROSSREFS
Sequence in context: A253168 A160004 A324299 * A079711 A283260 A217601
KEYWORD
nonn,more
AUTHOR
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 August 30 07:09 EDT 2024. Contains 375532 sequences. (Running on oeis4.)