OFFSET
0,2
COMMENTS
Also the number of n-step walks on a path graph ending within 2 steps of the origin. Also the number of monotonic paths of length n ending within 2 steps of the diagonal.
LINKS
Robert Israel, Table of n, a(n) for n = 0..3323
FORMULA
D-finite with recurrence +(n+2)*a(n) +n*a(n-1) +(-5*n-2)*a(n-2) +4*(-n+1)*a(n-3) +4*(n-3)*a(n-4)=0. - Conjectured by R. J. Mathar, Sep 27 2020, verified by Robert Israel, Oct 08 2020
G.f.: ((4*x + 2)*sqrt(-4*x^2 + 1) + 4*x^2 + 4*x + 2)/(sqrt(-4*x^2 + 1)*(1 + sqrt(-4*x^2 + 1))^2). - Robert Israel, Oct 08 2020
a(n) ~ 2^(n - 1/2) * (5 + (-1)^n) / sqrt(Pi*n). - Vaclav Kotesovec, Mar 08 2023
MAPLE
f:= gfun:-rectoproc({(4 + 4*n)*a(n) + (-12 - 4*n)*a(1 + n) + (-22 - 5*n)*a(2 + n) + (n + 4)*a(n + 3) + (6 + n)*a(n + 4), a(0) = 1, a(1) = 2, a(2) = 4, a(3) = 6}, a(n), remember):
map(f, [$0..100]); # Robert Israel, Oct 08 2020
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Nachum Dershowitz, Aug 29 2020
STATUS
approved