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.

Showing 1-8 of 8 results.

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

Original entry on oeis.org

1, 0, 8, 24, 216, 1200, 8840, 58800, 423640, 3000480, 21824208, 158964960, 1171230984, 8668531872, 64574844048, 483114856224, 3630440899800, 27379154692032, 207172490054816, 1572194644061184, 11962847247681616, 91242602561647680, 697438669619791008
Offset: 0

Views

Author

Matthijs Coster, Apr 29 2004

Keywords

Comments

The chessboard here is the full four-quadrant board Z X Z.
This is an analog of A054474 for walks on a square grid where the steps can be made diagonally as well.
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

References

  • D. Joyner, "Adventures in Group Theory: Rubik's Cube, Merlin's Machine and Other Mathematical Toys", Johns Hopkins University Press, 2002, pp. 79

Crossrefs

Programs

  • Maple
    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:
    # second Maple program
    a:= proc(n) option remember; `if`(n<3, (n-1)*(9*n-2)/2,
          ((n-1)*(3*n-1)*(3*n-4) *a(n-1)
          +(108*n^3-396*n^2+452*n-152) *a(n-2)
          +32*(3*n-2)*(n-2)^2 *a(n-3))/ (n^2*(3*n-5)))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 02 2012
  • Mathematica
    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 *)
    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 *)
  • Maxima
    a[0]:1$
    a[1]:0$
    a[2]:8$
    a[3]:24$
    a[n]:=((n-1)*(3*n-1)*(3*n-4) *a[n-1]
          +(108*n^3-396*n^2+452*n-152) *a[n-2]
          +32*(3*n-2)*(n-2)^2 *a[n-3])/ (n^2*(3*n-5))$
    A094061(n):=a[n]$
    makelist(A094061(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • 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
    
  • 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

Formula

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).
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
a(n) ~ 2^(3*n+1)/(3*Pi*n). - Vaclav Kotesovec, Aug 16 2013
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
a(n) = Sum_{k=0..n} (-1)^(n-k) * binomial(n,k) * A002426(k)^2. - Seiichi Manyama, Oct 29 2019
From Peter Bala, Feb 08 2022: (Start)
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.
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)
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

Extensions

More terms from and entry improved by Sergey Perepechko, Sep 06 2004

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

Views

Author

Vaclav Kotesovec, Jan 31 2015

Keywords

Comments

Giraffe is a (fairy chess) leaper [1,4].
Conjecture: Number of 2n-move closed paths of leaper [r,s] on an unbounded chessboard, where 0 < r < s and gcd(r,s)=1, is asymptotic to 2^(6*n+1) / ((r^2+s^2)*Pi*n) if r+s is even, and 2^(6*n) / ((r^2+s^2)*Pi*n) if r+s is odd.

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

a(n) ~ 64^n / (17*Pi*n).
a(n) = the constant term in the expansion of (x*y^4 + x^4*y + 1/x*y^4 + 1/x^4*y + x/y^4 + x^4/y + 1/x/y^4 + 1/x^4/y)^(2*n). - Vaclav Kotesovec, Apr 01 2019

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

Views

Author

Vaclav Kotesovec, Jan 30 2015

Keywords

Comments

Zebra is a (fairy chess) leaper [2,3].
Conjecture: Number of 2n-move closed paths of leaper [r,s] on an unbounded chessboard, where 0 < r < s and gcd(r,s)=1, is asymptotic to 2^(6*n+1) / ((r^2+s^2)*Pi*n) if r+s is even, and 2^(6*n) / ((r^2+s^2)*Pi*n) if r+s is odd.

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)

Formula

a(n) ~ 64^n / (13*Pi*n).
a(n) = the constant term in the expansion of (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*n). - Vaclav Kotesovec, Apr 01 2019

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

Views

Author

Seiichi Manyama, Nov 02 2019

Keywords

Comments

Also number of (2*n)-step closed paths (from origin to origin) in 2-dimensional lattice, using steps (t_1,t_2) (|t_1| + |t_2| = 3).
*
|
*-- --*
| | |
*-- -- -- --*
| | | | |
*-- -- --P-- -- --*
| | | | |
*-- -- -- --*
| | |
*-- --*
|
*
Point P move to any position of * in the next step.

Crossrefs

Row n=1 of A329066.

Programs

  • PARI
    {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)}
    
  • PARI
    {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)}
    
  • PARI
    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)

Formula

Conjecture: a(n) ~ 3 * 144^n / (19*Pi*n). - Vaclav Kotesovec, Nov 04 2019

A297740 The number of distinct positions on an infinite chessboard reachable by the (2,3)-leaper in <= n moves.

Original entry on oeis.org

1, 9, 41, 129, 321, 625, 997, 1413, 1885, 2425, 3033, 3709, 4453, 5265, 6145, 7093, 8109, 9193, 10345, 11565, 12853, 14209, 15633, 17125, 18685, 20313, 22009, 23773, 25605, 27505, 29473, 31509, 33613, 35785, 38025, 40333, 42709, 45153, 47665, 50245, 52893
Offset: 0

Views

Author

R. J. Mathar, Jan 05 2018

Keywords

Crossrefs

Cf. A018836 (1,2)-leaper or (1,3)-leaper, A297741 (3,4)-leaper.
Partial sums of A018839.

Programs

  • Mathematica
    LinearRecurrence[{3, -3, 1}, {1, 9, 41, 129, 321, 625, 997, 1413, 1885, 2425}, 50] (* Paolo Xausa, Mar 17 2024 *)
  • PARI
    Vec((1 + x)*(1 + 5*x + 12*x^2 + 20*x^3 + 28*x^4 - 20*x^5 - 24*x^6 + 12*x^8) / (1 - x)^3 + O(x^40)) \\ Colin Barker, Jan 07 2018

Formula

a(n) = 34*n^2 + 30*n + 9 for n >= 6.
From Colin Barker, Jan 05 2018: (Start)
G.f.: (1 + x)*(1 + 5*x + 12*x^2 + 20*x^3 + 28*x^4 - 20*x^5 - 24*x^6 + 12*x^8) / (1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>9. (End)

A307347 Number of 2n-move closed antelope paths on an unbounded chessboard from a given square to the same square.

Original entry on oeis.org

1, 8, 168, 5120, 190120, 7939008, 357713664, 17010543264, 842994009000, 43192225007360, 2275378947981568, 122724475613935104, 6753785574641857024, 378138077830110886400, 21486835143540141873120, 1236506847203439155401920, 71934214120446285067176360
Offset: 0

Views

Author

Vaclav Kotesovec, Apr 03 2019

Keywords

Comments

Antelope is a leaper [3,4].

Crossrefs

Programs

  • Maple
    b:= proc(n, x, y) option remember; `if`(max(x, y)>4*n or x+y>7*n, 0,
          `if`(n=0, 1, add(b(n-1, abs(x+l[1]), abs(y+l[2])), l=[[4, 3],
          [3, 4], [-4, 3], [-3, 4], [4, -3], [3, -4], [-4, -3], [-3, -4]])))
        end:
    a:= n-> b(2*n, 0$2):
    seq(a(n), n=0..25);
    # second Maple program:
    poly := expand((x^4*y^3 + x^3*y^4 + 1/x^4*y^3 + 1/x^3*y^4 + x^4/y^3 + x^3/y^4 + 1/x^4/y^3 + 1/x^3/y^4)^2): z:=1: for n to 100 do z:=expand(z*poly): print(n, coeff(coeff(z, x, 0), y, 0)); end do:
  • Mathematica
    poly = Expand[(x^4*y^3 + x^3*y^4 + 1/x^4*y^3 + 1/x^3*y^4 + x^4/y^3 + x^3/y^4 + 1/x^4/y^3 + 1/x^3/y^4)^2]; z = 1; Flatten[{1, Table[z = Expand[z*poly]; z[[1]], {n, 1, 15}]}]

Formula

a(n) = the constant term in the expansion of (x^4*y^3 + x^3*y^4 + 1/x^4*y^3 + 1/x^3*y^4 + x^4/y^3 + x^3/y^4 + 1/x^4/y^3 + 1/x^3/y^4)^(2*n).
Conjecture: a(n) ~ 64^n / (25*Pi*n).

A368499 Number of non-congruent simple polygons with 2n sides on the unbounded chessboard such that each side is an edge of the corresponding knight graph.

Original entry on oeis.org

3, 13, 178, 3034, 64877, 1503790, 36930111
Offset: 2

Views

Author

Kaloyan Kapralov, Dec 27 2023

Keywords

Comments

A knight graph is a graph that represents all legal moves of the knight chess piece on a chessboard. Each vertex of this graph represents a square of the chessboard, and each edge connects two squares that are a knight's move apart from each other.
Two polygons in the knight graph are called congruent if one can be transformed into the other by applying one or more of the operations of translation, rotation, and reflection on the chessboard; otherwise, they are non-congruent.
This sequence, in contrast to A366778, considers only simple, i.e., non-self-intersecting polygons.

Examples

			For n=2 the a(2)=3 solutions (in standard chess notation) are:
  (a1,c2,d4,b3), (a2,c1,d2,c3), (a2,c1,d3,b3).
For n=3 the a(3)=13 solutions are:
  (a1,b3,a5,c4,e3,c2), (a1,b3,a5,c6,b4,c2), (a1,b3,a5,c6,d4,c2),
  (a1,b3,c5,e6,d4,c2), (a2,b4,c2,d4,e2,c1), (a2,b4,c6,d4,b3,c1),
  (a2,b4,c6,d4,e2,c1), (a2,b4,c6,e5,d3,c1), (a2,b4,d5,c3,e2,c1),
  (a2,b4,d5,f4,d3,c1), (a2,b4,d5,f4,e2,c1), (a2,c1,d3,f4,d5,c3),
  (a2,c1,e2,g3,e4,c3).
		

Crossrefs

A366778 Number of nonequivalent cycles of length 2n in the (2n+1) X (2n+1) knight graph.

Original entry on oeis.org

3, 25, 480, 12000, 350256, 10780549, 344680960
Offset: 2

Views

Author

Stoyan Kapralov, Dec 15 2023

Keywords

Comments

A knight graph is a graph that represents all legal moves of the knight chess piece on a chessboard. Each vertex of this graph represents a square of the chessboard, and each edge connects two squares that are a knight's move apart from each other.
Two cycles in the knight graph are called equivalent if one can be obtained from another by applying one or more of the operations of translation, rotation, and symmetry on the chessboard; otherwise, they are nonequivalent.

Examples

			For n=2 the a(2)=3 solutions (in standard chess notation) are: (a1, c2, d4, b3), (a2, c1, d2, c3), and (a2, c1, d3, b3).
Note that each of these three cycles is non-self-intersecting. For the remaining values of n there are two kind of cycles - self-intersecting and non-self-intersecting. For example, a self-intersecting cycle of length 6 is (a1, c2, b4, a2, c1, b3), while the cycle (a1, c2, e1, f3, d4, b3) is non-self-intersecting.
		

Crossrefs

Showing 1-8 of 8 results.