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-3 of 3 results.

A334720 Number of 2-dimensional closed-loop self-avoiding paths on a square lattice where each path consists of steps with incrementing length from 1 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 8, 24, 0, 0, 40, 112, 0, 0, 1376, 2008, 0, 0, 21720, 60848, 0, 0, 635544, 1517368, 0, 0, 20008456, 46010640, 0, 0, 640819936, 1571759136, 0, 0, 22704325648, 55436103264
Offset: 1

Views

Author

Scott R. Shannon, May 08 2020

Keywords

Comments

This sequence gives the number of closed-loop self avoiding walks on a 2D square lattice where the walk starts with a step length of 1 which then increments by 1 after each step up until the step length is n. No closed-loop path is possible until n = 7.
Like A010566 all possible paths are counted, including those that are equivalent via rotation and reflection.
For n = 8, 15, 20, 24, 27, 32, 35, 39, 44, ... = A380867, the path can be a rectangle. The first two cases are illustrated through the "Images" link from Scott R. Shannon. These numbers correspond to triangular numbers T(n) for which there are n1 > n2 > n3 > n4 >= 0 such that T(n) = 2(A+B) for A = T(n1) - T(n2) = T(n3) - T(n4) and B = T(n2) - T(n3). See A380867 for more. - M. F. Hasler, Mar 14 2025

Examples

			a(1) to a(6) = 0 as no closed-loop is possible.
a(7) = 8 as there is one path which forms a closed loop which can be walked in 8 different ways on a 2D square lattice. The path is:
.
             5
   *---.---.---.---.---*
   |                   |
   .                   .
   |                   |
   .                   .  4
   |                   |
6  .                   .
   |                   |     3
   .                   *---.---.---*
   |                               |
   .                               . 2
   |                               |
   *---.---.---.---.---.---.---X---*
                 7               1
.
See the attached link for text images of the closed loops for other n values.
		

Crossrefs

A352838 Irregular triangle read by rows: T(n, k) is the number of 2n-step closed walks on the square lattice having algebraic area k; n >= 0, 0 <= k <= floor(n^2/4).

Original entry on oeis.org

1, 4, 28, 4, 232, 72, 12, 2156, 1008, 308, 48, 8, 21944, 13160, 5540, 1560, 420, 80, 20, 240280, 168780, 87192, 33628, 11964, 3636, 1200, 264, 72, 12, 2787320, 2168544, 1291220, 610232, 262612, 101976, 40376, 13720, 4900, 1512, 420, 112, 28
Offset: 0

Views

Author

Andrei Zabolotskii, Apr 05 2022

Keywords

Comments

Rows can be extended to negative k with T(n, -k) = T(n, k). Sums of such extended rows give A002894.
T(n, k) is the number of words of length 2n equal to z^k in the Heisenberg group, presented as , where z=[x,y]. In particular, T(n, 0) = A307468(n).

Examples

			The table begins:
       1
       4
      28,      4
     232,     72,    12
    2156,   1008,   308,    48,     8
   21944,  13160,  5540,  1560,   420,   80,   20
  240280, 168780, 87192, 33628, 11964, 3636, 1200, 264, 72, 12
     ...
T(2, 0) = 28: the 4-step walks enclosing algebraic area 0 include 16 walks of the form "some two steps, then two steps right back" and 12 walks of the form "some step, step back, a different step, step back".
T(2, 1) = 4: the 4-step walks enclosing algebraic area 1 are the walks around each of the 4 squares touching the origin in the positive direction; cf. A334756(2, 1) = 8, which also counts walks around these squares in the negative direction.
		

Crossrefs

Row lengths are A033638 = A002620 + 1.
Row n ends with 4 * A026741(n) for n > 0.
Row 16 is A178106.
A334756 counts self-avoiding walks only.

Programs

  • Mathematica
    z[0, 0, 0, 0] = 1;
    z[-1, ] = z[, -1, _] = z[, , -1, ] = z[, , , -1] = 0;
    z[m1_, m2_, l1_, l2_] := z[m1, m2, l1, l2] = Expand[z[m1, m2, l1 - 1, l2] + z[m1, m2, l1, l2 - 1] + q^(l2 - l1) z[m1 - 1, m2, l1, l2] + q^(l1 - l2) z[m1, m2 - 1, l1, l2]];
    zN[n_] := Sum[z[m, m, n/2 - m, n/2 - m], {m, 0, n/2}];
    walks[n_] := Module[{gf = zN[2 n], e}, e = Exponent[gf, q, Max]; CoefficientList[gf q^e, q][[e + 1 ;;]]];
    Table[walks[n], {n, 0, 8}]

A335305 Number of 2-dimensional closed-loop self-avoiding paths on a square lattice where each path consists of steps of length 1 to n which can be taken in any order.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 16128, 287232, 0, 0, 1843367680, 45589291776, 0, 0
Offset: 1

Views

Author

Scott R. Shannon, May 31 2020

Keywords

Comments

This sequence gives the number of closed-loop self avoiding walks on a 2D square lattice where the walk consists of steps of length 1 to n which can be taken in any order. No closed-loop path is possible until n = 7.
As in A334720 the only n values which can form closed loops are those which correspond to even triangular numbers; any path must take the same number of steps back toward the origin as it does away from the origin in each of the four possible directions to form a closed loop, so the total sum of the steps in these directions must be even. As the walks consist of the steps of length 1 to n this implies only walks for which the sum of 1 to n is even can form closed loops.
Like A010566 all possible paths are counted, including those that are equivalent via rotation and reflection. Also counted as different walks are loops which visit identical lattice points but are done so by taking steps in a different order. This leads to an extremely rapid increase in the total number of loops possible as n increases.
a(15) is currently unknown but is likely to be about 6*10^15.

Examples

			a(1) to a(6) = 0 as no closed loop paths are possible.
a(7) = 16128. Given the first step has length 1 and is to the right, with the next non-right step being upward, there are 84 different loops. Each of these can be walked in at least 2 ways, with the single perfect square having 48 different possible walks. Each of these in turn can be started with a first step of length 1 to n, and each of these can then be walked in 8 different ways on a 2D square grid. This gives a total number of 7-step paths of 16128. This should be compared with A334720 where for n=7 only 8 paths are possible. See the attached link text file for more details of n=7.
		

Crossrefs

Showing 1-3 of 3 results.