A092765 Consider the 1-D random walk with jumps to next-nearest neighbors. Sequence gives number of paths of length n ending at origin.
1, 0, 4, 6, 36, 100, 430, 1470, 5796, 21336, 82404, 312180, 1203246, 4617756, 17846686, 68974906, 267498660, 1038555024, 4040525320, 15739195680, 61399048036, 239788778760, 937536139764, 3669179504364, 14373144873774, 56350223472600, 221094286028100
Offset: 0
Examples
a(3)=6 because 0=+2-1-1, 0=-2+1+1, 0=-1-1+2, 0=+1+1-2, 0=+1-2+1, 0=-1+2-1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- C. Banderier and P. Flajolet, Basic analytic combinatorics of directed lattice paths, Theoretical Computer Science, Vol. 281:1-2, pp. 37-80, 2002.
- P. Flajolet, Basic analytic combinatorics of directed lattice paths.
- K. Lakatos-Lindenberg and K. E. Shuler, Random walks with nonnearest neighbor transitions. I. Analytic 1-D theory for next-nearest neighbor and exponentially distributed steps, Journal of Mathematical Physics, Vol. 12 Num.4, pp. 633-652, 1971.
- Eric Weisstein's World of Mathematics, Eight Curve
Programs
-
Maple
a:=array(0..20):a[0]:=1:a[1]:=0:a[2]:=4:for n from 2 to 19 do a[n+1]:=(-n*(17*n-43)*a[n]+(78*n^2-66*n+36)*a[n-1]+(216*n^2-540*n+324)*a[n-2])/(2*(n+1)*(2*n+1)):print(n+1,a[n+1]) od: seq(coeff( (t^2+t+1/t+1/t^2)^n, t, 0), n=0..24); # Mark van Hoeij, May 20 2013
-
Mathematica
a[n_] := Binomial[4n, 2n]*Hypergeometric2F1[-2n, -n, 1/2 - 2n, 3/4]; Table[a[n], {n, 0, 24}] (* Jean-François Alcover, Nov 22 2012 *)
-
PARI
a(n) = sum(k=0,n,binomial(n,k)*binomial(4*n-2*k,2*n-k)*(-3)^k) /* Max Alekseyev, Apr 19 2006 */
-
PARI
a(n)=sum(k=0,n,binomial(n,k)*binomial(n,2*n-3*k)) /* Max Alekseyev, Feb 08 2008 */
-
PARI
a(n)=sum(k=0,2*n,(-1)^k*binomial(2*n,k)*polcoeff((1+x+x^2)^n,k)) /* Paul D. Hanna, Nov 30 2009 */
-
PARI
a(n) = polcoeff(( (1-x)*(1-x^3) + O(x^(2*n+1)) )^n, 2*n); /* Max Alekseyev, Jun 01 2015 */
Formula
G.f. in Maple notation: {x*(1+6*x)*(1-4*x)*(4+9*x)*diff(G(x), x, x)=2*(270*x^3+84*x^2+13*x-1)*diff(G(x), x)+4*x*(12+27*x)*G(x), G(0)=1, D(G)(0)=0} rec; 2*(n+1)*(2*n+1)*a(n+1)+n*(17*n-43)*a(n)=(78*n^2-66*n+36)*a(n-1)+(216*n^2-540*n+324)*a(n-2).
GFun gives the following algebraic equation for generating function: x+2*(1-4*x)*(3*x-2)*g(x)^2+(1-4*x)^2*(9*x+4)*g(x)^4=0. - Sergey Perepechko, Sep 06 2004
a(n) = (2^(2n+1) / Pi) * Integral(cos(t)^n*cos(3*t)^n, t=0..Pi/2); a(n) = Sum_{k=0..n} binomial(n,k)*binomial(4*n-2*k,2*n-k)*(-3)^k. G.f.: (1 + sqrt(1-4*x)) / ( sqrt(1-4*x) * ( sqrt(1+6*x+2*sqrt(9*x^2+4*x)) + sqrt(1+6*x-2*sqrt(9*x^2+4*x)) ) ). - Max Alekseyev, Apr 19 2006
a(n) = Sum_{k=0..n} binomial(n,k)*binomial(n,2*n-3*k). - Max Alekseyev, Feb 08 2008
a(n) = Sum_{k=0..2n} (-1)^k*binomial(2n,k)*A027907(n,k) where A027907 is the triangle of trinomial coefficients. - Paul D. Hanna, Nov 30 2009
a(n) = ((n-1)*(35*n^2-49*n+12) *a(n-1) +18*(n-1)*(2*n-3)*(5*n-2) *a(n-2)) / (2*n*(2*n-1)*(5*n-7)) for n>=2, a(n) = 1-n for n<2. - Alois P. Heinz, May 20 2013
a(n) ~ 4^n / sqrt(5*Pi*n). - Vaclav Kotesovec, Sep 12 2014
a(n) is the coefficient of x^(2*n) in ((1-x)*(1-x^3))^n. - Max Alekseyev, Jun 01 2015
a(n) = (-1)^n*binomial(2*n,n)*hypergeom([-n,n/2,(n+1)/2],[n,n+1],4). - Peter Luschny, Nov 02 2016
From Peter Bala, Feb 08 2022: (Start)
a(n) = Sum_{k = 0..n} (-1)^k*binomial(2*n,k)*binomial(3*n-2*k-1,n-k).
a(n) = Sum_{k = 0..floor(n/2)} binomial(2*n,k)*binomial(n-k-1,n-2*k).
a(n) = [x^n] ((1 - x + x^2)/(1 - x))^(2*n).
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) ( mod p^k ) hold for any prime p and positive integers n and k.
Conjecture: the stronger congruences a(n*p^k) == a(n*p^(k-1)) ( mod p^(2*k) ) hold for any prime p, except p = 3, and positive integers n and k.(End)
Extensions
More terms from Max Alekseyev, Apr 19 2006
Comments