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!)
A182530 Number of Dyck 2n-paths with all ascents of even length and all descents of odd length. 1
1, 0, 1, 3, 9, 33, 125, 484, 1933, 7883, 32656, 137127, 582353, 2496711, 10791823, 46978411, 205775845, 906291623, 4011033078, 17829430207, 79565177628, 356329040864, 1600966438342, 7214304154481, 32597284112813, 147655425387293, 670371400288210 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
Vaclav Kotesovec, Recurrence (of order 8)
FORMULA
a(n) ~ c * d^n / n^(3/2), where d = 4.80922177566836796327406959229376... is the root of the equation 20 - 223*d - 36*d^2 - 60*d^3 + 16*d^4 = 0, c = 0.1691900578944028281094160273139... . - Vaclav Kotesovec, Aug 22 2014
EXAMPLE
For n=3 the three Dyck 6-paths are UUUUDUUDDDDD, UUUUDDDUUDDD and UUDUUUUDDDDD.
MAPLE
b:= proc(x, y, d) option remember;
`if`(x<0 or y<x, 0, `if`(x=0 and y=0, 1,
b(x, y-2, true) +b(x-`if`(d, 1, 2), y, false)))
end:
a:= n-> b(2*n, 2*n, true):
seq(a(n), n=0..30); # Alois P. Heinz, May 04 2012
MATHEMATICA
NN=26; Array[a, {NN*2+1, NN*2+1}]; seq={};
fodd[t_, k_]:=a[t, k]=If[k==1, 1, If[k==Floor[t/2], a[t, k-1]+a[t-1, k-1]+a[t-3, k-1], a[t-2, k]+a[t, k-1]+a[t-1, k-1]-a[t-2, k-1]]];
feven[t_, k_]:=a[t, k]=If[k==1, 0, If[k==Floor[t/2], a[t, k-1]+a[t-1, k-1], a[t-2, k]+a[t, k-1]+a[t-1, k-1]-a[t-2, k-1]]];
For[t=2, t<=NN*2, t++, For[k=1, k<=Floor[t/2], k++, If[OddQ[t], fodd[t, k], feven[t, k]; If[k==Floor[t/2], seq=Append[seq, a[t, k]]]]]]; seq
(* Second program: *)
b[x_, y_, d_] := b[x, y, d] =
If[x < 0 || y < x, 0, If[x == 0 && y == 0, 1,
b[x, y - 2, True] + b[x - If[d, 1, 2], y, False]]];
a[n_] := b[2*n, 2*n, True];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 01 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A039648 A307454 A219261 * A049182 A049168 A049171
KEYWORD
nonn
AUTHOR
David Scambler, May 03 2012
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 April 25 06:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)