A054474
Number of walks on square lattice that start and end at origin after 2n steps, not touching origin at intermediate stages.
Original entry on oeis.org
1, 4, 20, 176, 1876, 22064, 275568, 3584064, 47995476, 657037232, 9150655216, 129214858304, 1845409805168, 26606114089024, 386679996988736, 5658611409163008, 83302885723872852, 1232764004638179504, 18327520881735288432, 273595871825723062848
Offset: 0
Alessandro Zinani (alzinani(AT)tin.it), May 19 2000
a(5)=22064, i.e., there are 22064 different walks (on a square lattice) that start and end at the origin after 2*5=10 steps, avoiding the origin at intermediate steps.
- S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 322-331.
-
b:= proc(n) b(n):= binomial(2*n, n)^2 end:
a:= proc(n) option remember;
b(n)-add(a(n-i)*b(i), i=1..n-1)
end:
seq(a(n), n=0..21); # Alois P. Heinz, Dec 05 2023
-
m = 18; gf[x_] = 2 - Pi/(2*EllipticK[4*Sqrt[x]]); (List @@ Normal[ Series[ gf[x], {x, 0, m-1}]] /. x -> 1)[[1 ;; m+1]]*Table[4^k, {k, 0, m}] (* Jean-François Alcover, Jun 16 2011, after Vladeta Jovovic *)
CoefficientList[Series[2-Pi/(2*EllipticK[16*x]),{x,0,20}],x] (* Vaclav Kotesovec, Mar 10 2014 *)
CoefficientList[Series[2-ArithmeticGeometricMean[1,Sqrt[1-16x]],{x,0,20}],x] (* Thomas Dybdahl Ahle, Oct 30 2023 *)
-
a(n)=if(n<0,0,polcoeff(2-agm(1,sqrt(1-16*x+x*O(x^n))),n))
A254129
Number of 2n-move closed knight paths on an unbounded chessboard from a given square to the same square.
Original entry on oeis.org
1, 8, 168, 5840, 261800, 13180608, 702273264, 38641656768, 2171652448680, 123938999632448, 7158206751686848, 417418594698260064, 24535017440445455216, 1451786144317963971200, 86396682439552099487040, 5166936574734171792925440, 310340697572034456203934120
Offset: 0
a(1) = 8. For illustration, let's assume we're on a usual 8 X 8 chessboard, with the knight initially at D4. Then there are 8 paths bringing it back to D4 in 2 moves:
D4-E6-D4; D4-F5-D4; D4-F3-D4; D4-E2-D4; D4-C2-D4; D4-B3-D4; D4-B5-D4; D4-C6-D4.
- Alois P. Heinz, Table of n, a(n) for n = 0..550 (first 85 terms from David A. Corneth)
- Shalosh B. Ekhad and Doron Zeilberger, In How Many Ways Can the Chess Pieces Walk n Steps, Staying on the Board?, May 19 2011; Local copy, pdf file only, no active links
- Mohamud Mohammed and Doron Zeilberger, Maple program SMAZ; Local copy
- Doron Zeilberger, Input file inSMAZ6; Local copy
- Doron Zeilberger, Output from Maple program SMAZ; Local copy
-
G:= cos(x+2*y)+cos(x-2*y)+cos(2*x+y)+cos(2*x-y):
F:= 1: a[0]:= 1:
for n from 1 to 20 do
F:= combine(F*G^2,trig);
a[n]:= 4^n*remove(has,F,cos);
od:
seq(a[n],n=0..20); # Robert Israel, Jan 26 2015
# second Maple program:
b:= proc(n, x, y) option remember; `if`(max(x, y)>2*n or x+y>3*n, 0,
`if`(n=0, 1, add(b(n-1, abs(x+l[1]), abs(y+l[2])), l=[[1, 2],
[2, 1], [-1, 2], [-2, 1], [1, -2], [2, -1], [-1, -2], [-2, -1]])))
end:
a:= n-> b(2*n, 0$2):
seq(a(n), n=0..25); # Alois P. Heinz, Jan 29 2015
-
b[n_, x_, y_] := b[n, x, y] = If[Max[x, y] > 2n || x+y > 3n, 0, If[n == 0, 1, Sum[b[n-1, Abs[x+l[[1]]], Abs[y+l[[2]]]], {l, {{1, 2}, {2, 1}, {-1, 2}, {-2, 1}, {1, -2}, {2, -1}, {-1, -2}, {-2, -1}}}]]];
a[n_] := b[2n, 0, 0];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 30 2019, after Alois P. Heinz *)
-
a(n)={my(l=listcreate(),v=vector(2*n+1));m=matrix(1,1);m[1,1]=1;listput(l,m);v[1]=1;for(i=2,2*n+1, m=matrix(4*i-3,4*i-3);for(j=1,#l[i-1],for(k=1,#l[i-1],m[j+2-2,k+2-1]+=l[i-1][j,k];m[j+2-2,k+2+1]+=l[i-1][j,k];m[j+2-1,k+2-2]+=l[i-1][j,k];m[j+2-1,k+2+2]+=l[i-1][j,k];m[j+2+1,k+2-2]+=l[i-1][j,k];m[j+2+1,k+2+2]+=l[i-1][j,k];m[j+2+2,k+2-1]+=l[i-1][j,k];m[j+2+2,k+2+1]+=l[i-1][j,k]));v[i]=m[2*i-1,2*i-1];listput(l,m););listput(l,v);v[#v]} \\ David A. Corneth, Jan 26 2015
-
{a(n) = polcoef(polcoef((x^2*y+x*y^2+y^2/x+y/x^2+1/(x^2*y)+1/(x*y^2)+x/y^2+x^2/y)^(2*n), 0), 0)} \\ Seiichi Manyama, Nov 02 2019
A168597
Squares of the central trinomial coefficients (A002426).
Original entry on oeis.org
1, 1, 9, 49, 361, 2601, 19881, 154449, 1225449, 9853321, 80156209, 658076409, 5444816521, 45343869481, 379735715529, 3195538786449, 27004932177129, 229066136374761, 1949470542590481, 16640188083903609, 142415188146838161, 1221800234100831441, 10504959504381567729
Offset: 0
-
a := n -> (-1)^n*hypergeom([1/2,-n],[1],4)*hypergeom([1/2-n/2,-n/2],[1], 4): seq(simplify(a(n)),n=0..20); # Peter Luschny, Nov 10 2014
-
Table[(-1)^n*Hypergeometric2F1[1/2, -n, 1, 4] * Hypergeometric2F1[(1 - n)/2, -n/2, 1, 4], {n, 0, 50}] (* G. C. Greubel, Feb 26 2017 *)
CoefficientList[Series[(2 EllipticK[(16 x)/(1 + 3 x)^2])/(Pi (1 + 3 x)), {x, 0, 28}], x, 26] (* After Mark van Hoeij, Peter Luschny, May 13 2025 *)
-
{a(n)=polcoeff((1+x+x^2 +x*O(x^n))^n,n)^2}
for(n=0, 20, print1(a(n), ", "))
-
/* Using AGM: */
{a(n)=polcoeff( 1 / agm(1+3*x, sqrt((1+3*x)^2 - 16*x +x*O(x^n))), n)}
for(n=0, 20, print1(a(n), ", ")) \\ Paul D. Hanna, Sep 04 2014
A253974
Number of 2n-move closed giraffe paths on an unbounded chessboard from a given square to the same square.
Original entry on oeis.org
1, 8, 168, 5120, 190120, 7964208, 362370624, 17532536736, 889716433320, 46887220540160, 2546408317827088, 141659449976239104, 8033749056463329472, 462687411167492828000, 26980019699392099317600, 1589091557661690119997120, 94361786346423775855372200
Offset: 0
-
b:= proc(n, x, y) option remember; `if`(max(x, y)>4*n or x+y>5*n, 0,
`if`(n=0, 1, add(b(n-1, abs(x+l[1]), abs(y+l[2])), l=[[4, 1],
[1, 4], [-4, 1], [-1, 4], [4, -1], [1, -4], [-4, -1], [-1, -4]])))
end:
a:= n-> b(2*n, 0$2):
seq(a(n), n=0..25); # after Alois P. Heinz
# second Maple program:
poly:=expand((x*y^4+x^4*y+y^4/x+y/x^4+x/y^4+x^4/y+1/(x*y^4)+1/(x^4*y))^2): z:=1: for n to 100 do z:=expand(z*poly): print(n, coeff(coeff(z, x, 0), y, 0)); end do: # Vaclav Kotesovec, Apr 03 2019
-
b[n_, x_, y_] := b[n, x, y] = If[Max[x, y] > 4n || x + y > 5n, 0, If[n == 0, 1, Sum[b[n - 1, Abs[x + l[[1]]], Abs[y + l[[2]]]], {l, {{4, 1}, {1, 4}, {-4, 1}, {-1, 4}, {4, -1}, {1, -4}, {-4, -1}, {-1, -4}}}]]];
a[n_] := b[2n, 0, 0];
a /@ Range[0, 25] (* Jean-François Alcover, Nov 01 2020, after Maple *)
A254459
Number of 2n-move closed zebra paths on an unbounded chessboard from a given square to the same square.
Original entry on oeis.org
1, 8, 168, 5120, 190120, 8039808, 373369920, 18576523680, 972362837160, 52832252432960, 2950644716576128, 168192125309339040, 9735527029198105408, 570163460613978204800, 33697054064651581144800, 2005939326990647575285920, 120109818840839172931095720
Offset: 0
-
b:= proc(n, x, y) option remember; `if`(max(x, y)>3*n or x+y>5*n, 0,
`if`(n=0, 1, add(b(n-1, abs(x+l[1]), abs(y+l[2])), l=[[3, 2],
[2, 3], [-3, 2], [-2, 3], [3, -2], [2, -3], [-3, -2], [-2, -3]])))
end:
a:= n-> b(2*n, 0$2):
seq(a(n), n=0..25); # after Alois P. Heinz
# second Maple program:
poly:=expand((x^2*y^3 + x^3*y^2 + 1/x^2*y^3 + 1/x^3*y^2 + x^2/y^3 + x^3/y^2 + 1/x^2/y^3 + 1/x^3/y^2)^2): z:=1: for n to 100 do z:=expand(z*poly): print(n, coeff(coeff(z, x, 0), y, 0)); end do: # Vaclav Kotesovec, Apr 03 2019
-
b[n_, x_, y_] := b[n, x, y] = If[Max[x, y] > 3n || x + y > 5n, 0, If[n == 0, 1, Sum[b[n - 1, Abs[x + l[[1]]], Abs[y + l[[2]]]], {l, {{3, 2}, {2, 3}, {-3, 2}, {-2, 3}, {3, -2}, {2, -3}, {-3, -2}, {-2, -3}}}]]];
a[n_] := b[2n, 0, 0];
a /@ Range[0, 25] (* Jean-François Alcover, Nov 01 2020, after Maple *)
A288470
a(n) = Sum_{k=0..n} binomial(n,k)*binomial(2*n,2*k).
Original entry on oeis.org
1, 2, 14, 92, 646, 4652, 34124, 253528, 1901638, 14368844, 109208164, 833981128, 6394017436, 49185717752, 379438594136, 2934361958192, 22741538394694, 176582855512588, 1373431963785332, 10698376362421096, 83447762846703796, 651690159076273192, 5095051571420324264, 39874449115469939152, 312350761370734541596
Offset: 0
-
f:= gfun:-rectoproc({n*(2*n-1)*a(n) = (32*(n-2))*(2*n-5)*a(n-3)+(8*(9*n^2-31*n+28))*a(n-2)+(2*(3*n^2+7*n-9))*a(n-1), a(0)=1,a(1)=2, a(2)=14},a(n),remember):
map(f, [$0..30]);
-
Table[Sum[Binomial[n, k] Binomial[2 n, 2 k], {k, 0, n}], {n, 0, 24}] (* Michael De Vlieger, Jun 09 2017 *)
-
{a(n) = polcoef((-1+(1+x+1/x)^2)^n, 0)} \\ Seiichi Manyama, Nov 21 2019
A328874
Constant term in the expansion of (-1 + (1 + x + 1/x) * (1 + y + 1/y) * (1 + z + 1/z))^n.
Original entry on oeis.org
1, 0, 26, 264, 5646, 101520, 2103740, 43632960, 942507790, 20685977760, 462661368876, 10483696885200, 240373512418116, 5564581640601984, 129901678525143096, 3054381796821779424, 72272856926974596750, 1719662128611006026304, 41120565854695068532076, 987633314722818034066224
Offset: 0
-
Table[Sum[(-1)^(n-k) * Binomial[n, k] * Sum[Binomial[k, 2*j]*Binomial[2*j, j], {j, 0, k}]^3, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Oct 30 2019 *)
Table[Sum[(-1)^(n-k) * Binomial[n, k] * Hypergeometric2F1[1/2 - k/2, -k/2, 1, 4]^3, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Oct 30 2019 *)
-
{a(n) = polcoef(polcoef(polcoef((-1+(1+x+1/x)*(1+y+1/y)*(1+z+1/z))^n, 0), 0), 0)}
-
{a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*polcoef((1+x+1/x)^k, 0)^3)}
A329074
Square array T(n,k), n>=0, k>=0, read by antidiagonals, where T(n,k) is the constant term in the expansion of ((Sum_{j=-n..n} x^j) * (Sum_{j=-n..n} y^j) - (Sum_{j=-n+1..n-1} x^j) * (Sum_{j=-n+1..n-1} y^j))^k.
Original entry on oeis.org
1, 1, 1, 1, 0, 1, 1, 8, 0, 1, 1, 24, 16, 0, 1, 1, 216, 48, 24, 0, 1, 1, 1200, 1200, 72, 32, 0, 1, 1, 8840, 10200, 3336, 96, 40, 0, 1, 1, 58800, 165760, 34800, 7008, 120, 48, 0, 1, 1, 423640, 2032800, 912840, 82800, 12600, 144, 56, 0, 1
Offset: 0
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 0, 8, 24, 216, 1200, ...
1, 0, 16, 48, 1200, 10200, ...
1, 0, 24, 72, 3336, 34800, ...
1, 0, 32, 96, 7008, 82800, ...
1, 0, 40, 120, 12600, 162000, ...
-
{T(n, k) = if(n==0, 1, polcoef(polcoef((sum(j=0, 2*n, (x^j+1/x^j)*(y^(2*n-j)+1/y^(2*n-j)))-x^(2*n)-1/x^(2*n)-y^(2*n)-1/y^(2*n))^k, 0), 0))}
-
f(n) = (x^(n+1)-1/x^n)/(x-1);
T(n, k) = if(n==0, 1, sum(j=0, k, (-1)^(k-j)*binomial(k, j)*polcoef(f(n)^j*f(n-1)^(k-j), 0)^2))
A328875
Constant term in the expansion of (-1 + (1 + w + 1/w) * (1 + x + 1/x) * (1 + y + 1/y) * (1 + z + 1/z))^n.
Original entry on oeis.org
1, 0, 80, 2160, 121200, 6136800, 356570960, 21225304800, 1321586558320, 84398804078400, 5518934916677280, 367489108030524480, 24852668879410144080, 1702677155195779963200, 117960677109321028039200, 8251450286371615261498560, 582087494621171173360817520
Offset: 0
-
Table[Sum[(-1)^(n-k) * Binomial[n, k] * Sum[Binomial[k, 2*j]*Binomial[2*j, j], {j, 0, k}]^4, {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Oct 30 2019 *)
-
{a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*polcoef((1+x+1/x)^k, 0)^4)}
A329024
Constant term in the expansion of ((x^3 + x + 1/x + 1/x^3)*(y^3 + y + 1/y + 1/y^3) - (x + 1/x)*(y + 1/y))^(2*n).
Original entry on oeis.org
1, 12, 588, 49440, 5187980, 597027312, 71962945824, 8923789535232, 1128795397492620, 144940851928720848, 18832163401980525168, 2470451402766989534256, 326667449725835512275488, 43485599433527022301377600, 5821983056232777427055717760
Offset: 0
-
{a(n) = polcoef(polcoef(((x^3+x+1/x+1/x^3)*(y^3+y+1/y+1/y^3)-(x+1/x)*(y+1/y))^(2*n), 0), 0)}
-
{a(n) = polcoef(polcoef((sum(k=0, 3, (x^k+1/x^k)*(y^(3-k)+1/y^(3-k)))-x^3-1/x^3-y^3-1/y^3)^(2*n), 0), 0)}
-
f(n) = (x^(2*n+2)-1/x^(2*n+2))/(x-1/x);
a(n) = sum(k=0, 2*n, (-1)^k*binomial(2*n, k)*polcoef(f(1)^k*f(0)^(2*n-k), 0)^2)
Showing 1-10 of 20 results.
Comments