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!)
A339565 Number of lattice paths from (0,0) to (n,n) using steps (0,1), (1,0), (1,1), (1,2), (2,1). 2
1, 3, 17, 101, 627, 3999, 25955, 170571, 1131433, 7559301, 50795985, 342935689, 2324278669, 15804931797, 107775401349, 736723618773, 5046774983235, 34636814325087, 238114193665451, 1639378334244867, 11301978856210543, 78010917772099207, 539055832175992119 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1179 (first 101 terms from Kent Mei)
FORMULA
a(n) = [(x*y)^n] 1/(1-x-y-x*y-x*y^2-x^2*y). - Alois P. Heinz, Dec 09 2020
MAPLE
a:= proc(n) local t; 1/(1-x-y-x*y-(x*y^2)-(x^2*y));
for t in [x, y] do coeftayl(%, t=0, n) od
end:
seq(a(n), n=0..25); # Alois P. Heinz, Dec 09 2020
# second Maple program:
b:= proc(l) option remember; `if`(l[2]=0, 1,
add((f-> `if`(f[1]<0, 0, b(f)))(sort(l-h)), h=
[[1, 0], [0, 1], [1$2], [1, 2], [2, 1]]))
end:
a:= n-> b([n$2]):
seq(a(n), n=0..25); # Alois P. Heinz, Dec 09 2020
# third Maple program:
a:= proc(n) option remember; `if`(n<3, [1, 3, 17][n+1],
((6*n-3)*a(n-1)+(7*n-7)*a(n-2)+(4*n-6)*a(n-3))/n)
end:
seq(a(n), n=0..25); # Alois P. Heinz, Dec 09 2020
MATHEMATICA
b[l_] := b[l] = If[l[[2]] == 0, 1,
Sum[Function[f, If[f[[1]] < 0, 0, b[f]]][Sort[l - h]], {h,
{{1, 0}, {0, 1}, {1, 1}, {1, 2}, {2, 1}}}]];
a[n_] := b[{n, n}];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 30 2022, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A330626 A161940 A074565 * A241768 A370286 A054365
KEYWORD
nonn
AUTHOR
Kent Mei, Dec 08 2020
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 12 05:37 EDT 2024. Contains 372431 sequences. (Running on oeis4.)