cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A094061 Number of n-moves paths of a king starting and ending at the origin of an infinite chessboard.

This page as a plain text file.
%I A094061 #81 Aug 12 2025 01:57:41
%S A094061 1,0,8,24,216,1200,8840,58800,423640,3000480,21824208,158964960,
%T A094061 1171230984,8668531872,64574844048,483114856224,3630440899800,
%U A094061 27379154692032,207172490054816,1572194644061184,11962847247681616,91242602561647680,697438669619791008
%N A094061 Number of n-moves paths of a king starting and ending at the origin of an infinite chessboard.
%C A094061 The chessboard here is the full four-quadrant board Z X Z.
%C A094061 This is an analog of A054474 for walks on a square grid where the steps can be made diagonally as well.
%C A094061 a(n) is the constant term in the expansion of ((x + 1/x) * (y + 1/y) + x^2 + 1/x^2 + y^2 + 1/y^2)^n. - _Seiichi Manyama_, Nov 03 2019
%D A094061 D. Joyner, "Adventures in Group Theory: Rubik's Cube, Merlin's Machine and Other Mathematical Toys", Johns Hopkins University Press, 2002, pp. 79
%H A094061 Alois P. Heinz, <a href="/A094061/b094061.txt">Table of n, a(n) for n = 0..1000</a>
%H A094061 Peter Bala, <a href="/A094061/a094061.pdf">A note on A094061</a>
%F A094061 D-finite with recurrence (n+1)^2*a(n+1) = n*(5*n+1)*a(n) + 2*(15*n^2+6*n-5)*a(n-1) - 8*(5*n^2-23*n+21) *a(n-2) - 64*(n-2)^2*a(n-3).
%F A094061 G.f.: (2/(Pi*(1+4*x))) * EllipticK(4*sqrt(x*(1+x))/(1+4*x)) = 1/(1+4*x) * hypergeom([1/2,1/2], [1], 16*(x*(1+x))/(1+4*x)^2). - _Sergey Perepechko_, Jan 15 2011
%F A094061 a(n) ~ 2^(3*n+1)/(3*Pi*n). - _Vaclav Kotesovec_, Aug 16 2013
%F A094061 a(n) = (1/Pi^2) * Integral_{y = 0..Pi} Integral_{x = 0..Pi} (2*cos(x) + 2*cos(y) + 4*cos(x)*cos(y))^n dx dy. - _Peter Bala_, Feb 14 2017
%F A094061 a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A002426(k)^2. - _Seiichi Manyama_, Oct 29 2019
%F A094061 From _Peter Bala_, Feb 08 2022: (Start)
%F A094061 The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for all primes p and positive integers n and k.
%F A094061 Conjecture: the stronger congruences a(n*p^k) == a(n*p^(k-1)) (mod p^(2*k)) hold for all primes p >= 5 and positive integers n and k. (End)
%F A094061 a(n) = Sum_{j = 0..n} Sum_{k = 0..j} binomial(2*j,j)^2*binomial(j,k)* binomial(n+j-k,2*j)*(-4)^(n-j-k). - _Peter Bala_, Mar 19 2022
%p A094061 a:=array(0..30):a[0]:=1:a[1]:=0:a[2]:=8:a[3]:=24:for n from 3 to 29 do a[n+1]:= (n*(5*n+1)*a[n]+2*(15*n^2+6*n-5)*a[n-1]-8*(5*n^2-23*n+21)*a[n-2]-64*(n-2)^2*a[n-3])/(n+1)^2: print(n+1,a[n+1]) od:
%p A094061 # second Maple program
%p A094061 a:= proc(n) option remember; `if`(n<3, (n-1)*(9*n-2)/2,
%p A094061       ((n-1)*(3*n-1)*(3*n-4) *a(n-1)
%p A094061       +(108*n^3-396*n^2+452*n-152) *a(n-2)
%p A094061       +32*(3*n-2)*(n-2)^2 *a(n-3))/ (n^2*(3*n-5)))
%p A094061     end:
%p A094061 seq(a(n), n=0..30);  # _Alois P. Heinz_, Nov 02 2012
%t A094061 a[n_]:=Module[{f=(x+x^-1+y+y^-1+x y+x^-1y+x^-1y^-1+x y^-1)^n,s}, s=Series[f,{x,0,0},{y,0,0}]; SeriesCoefficient[s,{0,0}]]; Table[a[n], {n,1,22}] (* Armin Vollmer (Armin.Vollmer(AT)kabelleipzig.de), May 01 2006 *)
%t A094061 CoefficientList[Series[1/(1+4*x)*LegendreP[-1/2,1-32*x*(1+x)/(1+4*x)^2], {x, 0, 20}], x] (* _Vaclav Kotesovec_, Aug 16 2013 *)
%o A094061 (Maxima)
%o A094061 a[0]:1$
%o A094061 a[1]:0$
%o A094061 a[2]:8$
%o A094061 a[3]:24$
%o A094061 a[n]:=((n-1)*(3*n-1)*(3*n-4) *a[n-1]
%o A094061       +(108*n^3-396*n^2+452*n-152) *a[n-2]
%o A094061       +32*(3*n-2)*(n-2)^2 *a[n-3])/ (n^2*(3*n-5))$
%o A094061 A094061(n):=a[n]$
%o A094061 makelist(A094061(n),n,0,30); /* _Martin Ettl_, Nov 03 2012 */
%o A094061 (PARI) {a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n, k)*polcoef((1+x+1/x)^k, 0)^2)} \\ _Seiichi Manyama_, Oct 29 2019
%o A094061 (PARI) {a(n) = polcoef(polcoef(((x+1/x)*(y+1/y)+x^2+1/x^2+y^2+1/y^2)^n, 0), 0)} \\ _Seiichi Manyama_, Nov 03 2019
%Y A094061 Row 2 of A327751.
%Y A094061 Cf. A002426, A098070, A126869, A253974, A254129, A254459, A329024.
%K A094061 nonn,easy
%O A094061 0,3
%A A094061 _Matthijs Coster_, Apr 29 2004
%E A094061 More terms from and entry improved by _Sergey Perepechko_, Sep 06 2004