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

A358036 Number of n-step self-avoiding walks on a 2D square lattice where the first visited lattice point is directly visible from the last visited lattice point, and were both the visited lattice points and the path between these points are considered when determining the visibility of points.

Original entry on oeis.org

0, 8, 24, 48, 144, 336, 992, 2344, 6760, 16336, 46432, 113904, 320864, 793136, 2222824, 5524040, 15409704, 38493560, 106895408, 268253720, 742053704, 1869175480, 5154271008, 13022699248, 35816428904, 90722285632, 248960813992, 631978627880, 1730939615552
Offset: 1

Views

Author

Scott R. Shannon, Oct 26 2022

Keywords

Comments

Consider a self-avoiding walk on a 2D square lattice where two visited lattice points are considered to be visible from each other if, on drawing a line directly between these two points, the line neither crosses another lattice point which has been visited by previous steps of the walk, nor crosses any line directly connecting two consecutively visited lattice points that forms a part of the path of the walk. This sequence lists the number of n-step self-avoiding walks for which the first visited lattice point of the walk is directly visible from the last visited point. See the examples below.
For the 29-step walk the ratio of the number of end-to-end visible walks to all walks is a(29)/A001411(29) = 1730939615552/6279396229332 ~ 0.276. The value and behavior of this ratio as n -> infinity is unknown.
See A358046 for the number of walks when only the visited lattice points are considered when determining point visibility.

Examples

			a(1) = 0 as after one step in any of the four available directions the first and last point of the walk are directly connected by a line forming the path, so are not considered mutually visible.
a(2) = 8 as there are 4*3 = 12 2-step SAWs, but the four walks which consist of two steps directly along the axes have a visited lattice point directly between the first and last points of the walk, so those two point are not visible from each other. Thus a(2) = 12 - 4 = 8.
a(3) = 24 as there are thirty-six 3-step SAWs which include four walks directly along the axes which have a first point that is not visible from the last. In the first quadrant there is one other walk whose second-step path is intersected by the line between the first and last points of the walk. This walk is:
.
       .---X
       |
   X---.
.
where the first and last points are shown as 'X'. The above walk can be walked in eight ways on the 2D square lattice, so the total number of walks where the first point is visible from the last is 36 - 4 - 1*8 = 36 - 12 = 24.
a(4) = 48 as there are one hundred 4-step SAWs which include four walks directly along the axes which have a first point that is not visible from the last. In the first quadrant there are six other walks which have either previously visited points directly on the line between the first and last points of the walk, or in which this line intersects the path of previous steps. These walks are:
.
   X           .---X        X
   |           |            |
   @---.       @        @---.      .---.---X     .---.           .---X
       |       |        |          |             |   |           |
   X---.   X---.    X---.      X---.         X---@   X   X---.---.
.
where the visited points on the line between the first and last points are shown as '@'. Each of the above walks can be walked in eight ways on the 2D square lattice, so the total number of walks where the first point is visible from the last is 100 - 4 - 6*8 = 100 - 52 = 48.
		

Crossrefs

A358046 Number of n-step self-avoiding walks on a 2D square lattice where the first visited lattice point is directly visible from the last visited lattice point, and were only visited lattice points are considered when determining the visibility of points.

Original entry on oeis.org

4, 8, 32, 64, 240, 480, 1904, 3832, 13992, 29304, 103088, 219416, 765600, 1609176, 5611680, 11785240, 40641032, 86254960, 293015872, 628547128, 2108574592, 4556118936, 15143701888, 32875906992, 108521571624, 236390241280, 776007097296, 1695412485136, 5538287862344
Offset: 1

Views

Author

Scott R. Shannon, Oct 26 2022

Keywords

Comments

Consider a self-avoiding walk on a 2D square lattice where two visited lattice points are considered to be visible from each other if either no other lattice points exist on the line drawn directly between these two lattice points, or if such points exist, they have not been visited by previous steps of the walk. This sequence lists the number of n-step self-avoiding walks for which the first visited lattice point of the walk is directly visible from the last visited point. See the examples below.
For the walks studied there is a difference in the ratio for the number of end-to-end visible walks to all walks for steps with even-n to odd-n. For example a(28)/A001411(28) ~ 0.72, while a(29)/A001411(29) ~ 0.88. The values and behavior of these ratios as n -> infinity is unknown.
See A358036 for the number of walks where the path between lattice points is also considered when determining point visibility.

Examples

			a(1) = 4 as after one step in any of the four available directions the lattice point stepped to and the starting point have no other points between them, so the first point is visible from the last for all four walks.
a(2) = 8 as there are 4*3 = 12 2-step SAWs, but the four walks which consist of two steps directly along the axes have a visited lattice point directly between the first and last points of the walk, so those two point are not visible from each other. Thus a(2) = 12 - 4 = 8.
a(3) = 32 as there are thirty-six 3-step SAWs, and of those, only the four walks directly along the axes have visited points between the first and last points, so a(3) = 36 - 4 = 32.
a(4) = 64 as there are one hundred 4-step SAWs which include four walks directly along the axes which have a first point that is not visible from the last. In the first quadrant there are four other walks which have points on the line between the first and last point, and these points have been visited by earlier steps. These walks are:
.
     X            .---X          X
     |            |              |
     @---.        @          @---.       .---.
         |        |          |           |   |
     X---.    X---.      X---.       X---@   X
.
where the first and last points are shown as 'X' and where the visited points on the line between these two points are shown as '@'. Each of the above walks can be walked in eight ways on the 2D square lattice, so the total number of walks where the first point is visible from the last is 100 - 4 - 4*8 = 100 - 36 = 64.
		

Crossrefs

A347990 Number of n-step self-avoiding walks on a 2D square lattice where the walk cannot step to the smaller square ring of numbers than the ring it is currently on.

Original entry on oeis.org

1, 4, 12, 36, 92, 252, 628, 1644, 4052, 10340, 25332, 63708, 155452, 387036, 941948, 2328740, 5657236, 13914596, 33757804, 82713164, 200467108, 489746916, 1186060492, 2891000036, 6997192716, 17025058164, 41186981772, 100070851212, 242000513660, 587312389940
Offset: 0

Views

Author

Scott R. Shannon, Sep 23 2021

Keywords

Comments

The number of the square ring around the origin the walk is currently on is just the maximum of the absolute values of its current x and y coordinates. In this sequence the SAW cannot step to a coordinate that has a smaller ring number than the ring it is currently on. For example, a step from (1,2) to either (2,2), (1,3), (0,2) is permitted as it stays on the second ring or steps to the third, but a step from (1,2) to (1,1) is forbidden as that would be stepping to the smaller first ring.

Examples

			a(0..3) are the same as the standard square lattice SAW of A001411 as the walk cannot step to a smaller ring in the first three steps.
a(4) = 92. If we restrict the first one or more steps to the right followed by an upward step then there is one walk which steps to a smaller ring and is thus forbidden. That is the walk (0,0) -> (1,0) -> (2,0) -> (2,1) -> (1,1). As this can be walked in eight different ways on the square lattice the number of 4-step walks becomes A001411(4) - 8 = 100 - 8 = 92.
		

Crossrefs

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

A359073 Sum of square end-to-end displacements over all n-step self-avoiding walks of A359709.

Original entry on oeis.org

0, 4, 16, 44, 160, 556, 1744, 12252, 15840, 98876, 138160, 709900, 1155616, 5098260, 11820656, 37085908, 111147104, 281078764, 932893104, 2255139900, 7295211968, 18928121236, 54864568720, 160016686500, 404167501888, 1331607134172, 2945597090384, 10805511468852, 21448743511648
Offset: 0

Views

Author

Scott R. Shannon, Jan 12 2023

Keywords

Crossrefs

A359709 Number of n-step self-avoiding walks on a 2D square lattice whose end-to-end distance is an integer.

Original entry on oeis.org

1, 4, 4, 12, 28, 76, 164, 732, 1044, 4924, 6724, 30636, 43972, 190516, 313996, 1197908, 2284260, 7678188, 16257604, 50524252, 113052396, 341811828, 773714436, 2358452388, 5245994292, 16447462492, 35395532236, 115129727188, 238542983748, 804980005276
Offset: 0

Views

Author

Scott R. Shannon, Jan 12 2023

Keywords

Comments

The walks counted are all those directly along and x or y axes, and all walks whose final (|x|,|y|) lattice point are the two legs of a Pythagorean triple.

Examples

			a(3) = 12 as, in the first quadrant, there is one 3-step SAW whose end-to-end distance is an integer (1 unit):
.
     X---.
         |
     X---.
.
This can be walked in 8 different ways on a 2D square lattice. There are also the four walks directly along the x and y axes, giving a total of 8 + 4 = 12 walks.
		

Crossrefs

A348008 Number of n-step self-avoiding walks on the upper two quadrants of a 2D square lattice where the walk cannot step to the smaller square ring of numbers than the ring it is currently on.

Original entry on oeis.org

1, 3, 7, 19, 45, 115, 273, 683, 1629, 4035, 9643, 23713, 56761, 138883, 332807, 811343, 1945777, 4730655, 11351999, 27542291, 66123953, 160174529, 384700337, 930720767, 2236106651, 5404679299, 12988762401, 31370201873, 75409375419, 182019777165, 437648513199
Offset: 0

Views

Author

Scott R. Shannon, Sep 24 2021

Keywords

Comments

This is a variation of A347990. The same walk rules apply except that the walk is confined to the upper two quadrants of the 2D square lattice. See A347990 for further details.

Examples

			a(0..3) are the same as the standard SAW on the upper two quadrants of a square lattice, see A116903, as the walk cannot step to a smaller ring in the first three steps.
a(4) = 45. If we restrict the first one or more steps to the right followed by an upward step then there is one walk which steps to a smaller ring and is thus forbidden. That is the walk (0,0) -> (1,0) -> (2,0) -> (2,1) -> (1,1). As this can be walked in four different ways in the upper two quadrants the number of 4-step walks becomes A116903(4) - 4 = 49 - 4 = 45.
		

Crossrefs

Cf. A347990 (four quadrants), A348009 (one quadrant), A116903, A001411, A337353.

A348009 Number of n-step self-avoiding walks on one quadrant of a 2D square lattice where the walk cannot step to the smaller square ring of numbers than the ring it is currently on.

Original entry on oeis.org

1, 2, 4, 10, 22, 52, 118, 282, 646, 1544, 3576, 8546, 19924, 47612, 111536, 266488, 626520, 1496670, 3528470, 8427952, 19913078, 47559756, 112572916, 268857568, 637327742, 1522153378, 3612811784, 8629110414, 20503211908, 48975965026, 116478744692
Offset: 0

Views

Author

Scott R. Shannon, Sep 24 2021

Keywords

Comments

This is a variation of A347990. The same walk rules apply except that the walk is confined to one quadrant of the 2D square lattice. See A347990 for further details.

Examples

			a(0..3) are the same as the standard SAW on one quadrant of a square lattice, see A038373, as the walk cannot step to a smaller ring in the first three steps.
a(4) = 22. If we restrict the first one or more steps to the right followed by an upward step then there is one walk which steps to a smaller ring and is thus forbidden. That is the walk (0,0) -> (1,0) -> (2,0) -> (2,1) -> (1,1). As this can be walked in two different ways in one quadrant the number of 4-step walks becomes A038373(4) - 2 = 24 - 2 = 22.
		

Crossrefs

Cf. A347990 (four quadrants), A348008 (two quadrants), A038373, A001411, A337353.

A368614 Number of n-step self-avoiding walks on a 2D square lattice where each visited lattice point is either a neighbor of the first visited lattice point, else the first visited lattice point is directly visible (cf. A358036) from the lattice point when it is first visited.

Original entry on oeis.org

4, 8, 16, 24, 48, 80, 168, 296, 624, 1144, 2424, 4552, 9680, 18480, 39368, 76128, 162376, 317288, 677624, 1335688, 2856536, 5672576, 12149080, 24280768, 52079424, 104665200, 224825088, 454047672, 976721744, 1981083216, 4267578200, 8689274768, 18743542208, 38295782400, 82715689712
Offset: 1

Views

Author

Scott R. Shannon, Dec 31 2023

Keywords

Comments

The sequence counts the number of SAWs on the square lattice where, after the first step, all subsequent visited lattice points must be such that the first lattice point is directly visible from it when it is first visited - see A358036 for the definition of visibility.

Examples

			a(4) = 24. For walks with a second step in the first quadrant, there are three 4-step saws where the first lattice point is either a neighbor or directly visible from each point as it is first visited. These are:
.
  .---.---.   .---.     .
          |       |     |
      X---.       .     .
                  |     |
              X---.     .
                        |
                    X---.
.
where 'X' marks the position of the first lattice point. These three walks can be taken in eight ways on the 2D square lattice, so the total number of walks is 3 * 8 = 24.
		

Crossrefs

Showing 1-9 of 9 results.