login
A201805
Number of arrays of n integers in -2..2 with sum zero and equal numbers of elements greater than zero and less than zero.
7
1, 1, 5, 13, 61, 221, 1001, 4145, 18733, 82381, 375745, 1703945, 7858225, 36279985, 168992045, 789433013, 3707816333, 17467638925, 82599195809, 391645961993, 1862242702201, 8875355178521, 42394598106965, 202903189757053
OFFSET
0,3
COMMENTS
Column 2 of A201811.
Also the number of walks of length n from a vertex to itself on the infinite square lattice with a self loop on each vertex. - Pierre-Louis Giscard, Jun 25 2014
Also the number of 3D walks of length n in a half-space returning to axis of origin. - Nachum Dershowitz, Aug 04 2020
The central column of a number pyramid P(j,k,m), where P(j,k,m) = P(j,k,m-1) + P(j-1,k,m-1) + P(j+1,k,m-1) + P(j,k-1,m-1) + P(j,k+1,m-1). P(1,1,1) = 1. j, k = 1..2*m+1. m >=1. - Yuriy Sibirmovsky, Sep 17 2016
Row sums of A282252. - Peter Bala, Feb 12 2017
LINKS
R. H. Hardin and Seiichi Manyama, Table of n, a(n) for n = 0..1000 (a(1)-a(210) from R. H. Hardin)
Nachum Dershowitz, Touchard’s Drunkard, Journal of Integer Sequences, Vol. 20 (2017), #17.1.5. The sequence is type bbd in Table 3.
FORMULA
Empirical: n^2*a(n) = (3*n^2-3*n+1)*a(n-1) + 13*(n-1)^2*a(n-2) - 15*(n-2)*(n-1)*a(n-3). - Vaclav Kotesovec, Oct 19 2012
a(n) appears to be the constant term of (1 + X + 1/X + Y + 1/Y)^n, which has o.g.f. hypergeom([1/2, 1/2],[1],16*x^2/(1-x)^2)/(1-x). - Mark van Hoeij, May 07 2013
From Pierre-Louis Giscard, Jun 25 2014 : (Start)
a(n) is exactly the constant term of (1 + X + 1/X + Y + 1/Y)^n since this generates closed walks on the square lattice with self-loops. Non-constant terms generate walks to the neighbors of a vertex. Removing the 1 is equivalent to removing the self-loops.
a(n) = 3F2([1/2, 1/2 - n/2, -n/2], [1, 1], 16).
a(n) = Sum_{k=0..n} C(n,2k)*C(2k,k)^2.
O.g.f.: 2F1([1/2, 1/2], [1], 16*x^2/(1-x)^2)/(1-x) with 2F1 the Hypergeometric function.
E.g.f.: e^x I_{0}(2x)^2 with I_a(x) the modified Bessel function I of the first kind. (End)
O.g.f.: 1 / AGM(1+3*x, 1-5*x), given a(0)=1, where AGM(x,y) = AGM((x+y)/2,sqrt(x*y)) is the arithmetic-geometric mean. - Paul D. Hanna, Aug 31 2014
a(n) ~ 5^(n+1)/(4*Pi*n). - Vaclav Kotesovec, Oct 03 2016
EXAMPLE
Some solutions for n=9
.-1...-1....1....1....0...-2....2...-1...-2...-2....1....1....1....2....0....1
..1...-2...-2...-2...-1...-2....1....0....2....1....0...-2...-1...-2....0...-1
..0....0....2....1...-1....2...-1....1....0...-2...-1....1...-2....1...-1....1
.-1...-2....2....0...-2....1....0....2....0....0...-1...-1....2...-1....0....1
..2....1....0....2...-1....0....1...-2...-1...-1....1....0...-2....1....0...-1
..0....2...-2...-1....2....0...-2...-2....0....2....1...-1...-2....2....2....1
..1....1...-2....1....1...-1....0....2....1...-2....0....2....2...-2...-2...-1
..0...-1....2...-1....1....2...-1...-2....1....2...-1...-2....0....0....0....0
.-2....2...-1...-1....1....0....0....2...-1....2....0....2....2...-1....1...-1
MATHEMATICA
a[n_]=HypergeometricPFQ[{1/2, 1/2 - n/2, -(n/2)}, {1, 1}, 16]; (* or *)
a[n_]=Sum[Binomial[n, 2 k] Binomial[2 k, k]^2, {k, 0, n}]; (* or *)
Hypergeometric2F1[1/2, 1/2, 1, 16*x^2/(1 - x)^2]/(1 - x); (* O.g.f. *)
Exp[x] BesselI[0, 2 x] BesselI[0, 2 x]; (* E.g.f. *)(* Pierre-Louis Giscard, Jun 25 2014 *)
Nm=100;
C1=Table[0, {j, 1, Nm}, {k, 1, Nm}];
C1[[Nm/2, Nm/2]]=1;
C2=C1;
Do[Do[C2[[j, k]]=C1[[j-1, k]]+C1[[j+1, k]]+C1[[j, k-1]]+C1[[j, k+1]]+C1[[j, k]], {j, 2, Nm-1}, {k, 2, Nm-1}]; Print[n, " ", C2[[Nm/2, Nm/2]]];
C1=C2, {n, 1, 20}] (* Yuriy Sibirmovsky, Sep 17 2016 *)
PROG
(PARI) a(n) = sum(k=0, n, binomial(n, 2*k)*binomial(2*k, k)^2); \\ Michel Marcus, Jun 25 2014
(PARI) {a(n)=polcoeff(1/agm(1+3*x, 1-5*x +x*O(x^n)), n)}
for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Aug 31 2014
(PARI) {a(n) = polcoef(polcoef((1+x+y+1/x+1/y)^n, 0), 0)} \\ Seiichi Manyama, Oct 26 2019
CROSSREFS
Sum_{k=0..n} C(n,2k)*C(2k,k)^m: A002426 (m=1), this sequence (m=2).
Sequence in context: A151275 A149567 A149568 * A144725 A051902 A269514
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Dec 05 2011
EXTENSIONS
a(0)=1 prepended by Seiichi Manyama, Dec 02 2016
STATUS
approved