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.

A337550 Number of closed-loop self-avoiding paths of length 4n on a 2D square lattice where no step can be in the same direction as the previous step.

Original entry on oeis.org

8, 0, 24, 64, 360, 1728, 8624, 43776, 225216, 1173280, 6182704, 32905536, 176657000, 955629920, 5204178360, 28509374976, 157005901896, 868756900608, 4827586102216, 26929911745600, 150750954809952, 846588050093632, 4768197762850608
Offset: 1

Views

Author

Scott R. Shannon, Aug 31 2020

Keywords

Comments

See A337353 for the corresponding number of walks.
Only walks with a length of 4n (except for n=2) can create closed loops.
From Pontus von Brömssen, May 06 2025: (Start)
A006782 counts the walks up to starting point and direction of the walk.
A156228 counts the walks up to rotations, reflections, starting point, and direction of the walk.
(End)

Examples

			a(1) = 8. The single walk of length 4 is:
.
+---+
|   |
+---+
.
This can be taken in 8 different ways on a square lattice, giving a total 1*8 = 8.
a(2) = 0 as there is no closed-loop path consisting of 8 steps.
a(3) = 24. There is one walk, ignoring reflection and rotations, with a length of 12. The walk is:
.
    +---+
    |   |
+---+   +---+
|           |
+---+   +---+
    |   |
    +---+
.
This can be walked in 3 different ways if the first steps are right and then upward. This path can be then taken in 8 ways on a square lattice, giving a total number of 3*8 = 24.
a(4) = 64. There is one walk, with indistinct reflections and rotations, with a length of 16. The walk is:
.
        +---+
        |   |
    +---+   +---+
    |           |
+---+       +---+
|           |
+---+   +---+
    |   |
    +---+
.
This can be walked in 8 different ways if the first steps are right and then upward. This path can be then taken in 8 ways on a square lattice, giving a total number of 8*8 = 64.
.
a(5) = 360. There are four walks, with indistinct reflections and rotations, with a length of 20. The walks, and the different ways they can be taken, are:
.
            +---+              +---+
            |   |              |   |
        +---+   +---+      +---+   +---+
        |           |      |           |
    +---+       +---+      +---+       +---+
    |           |              |           |
+---+       +---+          +---+       +---+
|           |              |           |
+---+   +---+              +---+   +---+
    |   |     x 10             |   |     x 20
    +---+                      +---+
        +---+                  +---+
        |   |                  |   |
    +---+   +---+          +---+   +---+
    |           |          |           |
+---+           +---+      +---+   +---+
|                   |          |   |
+---+           +---+      +---+   +---+
    |           |          |           |
    +---+   +---+          +---+   +---+
        |   |    x 5           |   |     x 10
        +---+                  +---+
.
Each of these can be walked in 8 different ways on a square lattice, giving a total number of 8*(10+20+5+10) = 360.
See the attached text file for images of the closed-loops for n=1 to n=11.
		

Crossrefs

Formula

a(n) = 8*n*A006782(n). - Pontus von Brömssen, May 06 2025

Extensions

a(18)-a(19) from Bert Dobbelaere, Sep 09 2020
a(20)-a(23) (using A006782 data) from Pontus von Brömssen, May 06 2025