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-10 of 11 results. Next

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

A337353 Number of n-step self-avoiding walks on a square lattice where no step can be in the same direction as the previous step.

Original entry on oeis.org

1, 4, 8, 16, 24, 40, 64, 104, 168, 272, 440, 712, 1128, 1808, 2896, 4640, 7368, 11744, 18752, 29920, 47376, 75304, 119824, 190632, 301488, 478160, 759056, 1204848, 1903576, 3014272, 4776504, 7568688, 11947976, 18895760, 29901592, 47317080, 74643504, 117930520, 186413728, 294666160
Offset: 0

Views

Author

Scott R. Shannon, Aug 24 2020

Keywords

Examples

			a(5) = 40. The five possible 5-step walks in the first quadrant are:
.
+--+   +--+         +--+        +--+
|         |            |        |
+--+      +--+      +--+     +--+       +--+
   |         |      |        |          |  |
x--+      x--+   x--+     x--+       x--+  +--+
.
Each of these can be taken in eight ways on the square lattice, giving 40 in total.
		

Crossrefs

Formula

a(n) = 4*A336662(n).

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

A334602 Number of self-avoiding walks on a 2-dimensional square lattice where the walk consists of steps of length 1 to n which can be taken in any order.

Original entry on oeis.org

1, 4, 24, 216, 2544, 36832, 632736, 12566016, 283849872, 7179191888, 200946557168, 6165203252096
Offset: 0

Views

Author

Scott R. Shannon, May 07 2020

Keywords

Comments

This sequence gives the number of self-avoiding walks on a 2-dimensional square lattice where the walk consists of steps of length 1 to n which can be taken in any order. Walks which visit the same lattice coordinates but are done so by taking steps of the same length in different order are considered to be different walks. For example a walk consisting of steps with length 1 and 2 to the right is counted as a different walk to one with step lengths 2 and 1 to the right.
The first time a collision with a previous step can occur is for n = 4. If we only consider the first step being taken to the right then there are six ways this can occur. These are 2R->3U->1L->4D, 3R->1U->2L->4D, 3R->2U->1L->4D, 4R->1U->2L->3D, 4R->1U->3L->2D, 4R->2U->1L->3D, where the number is the step length and R,L,U,D are directions right,left,up and down from the origin.

Examples

			a(1) = 4. These are the four directions one can step 1 unit away from the origin on a 2D square lattice.
a(2) = 24. These consist of the following four walks:
.
    *
    |             *        1     2            2     1
    . 2           | 1    *---*---.---*    *---.---*---*
    |     *---.---*
*---*         2
  1
.
The first two can be walked in eight different ways on a 2D lattice, the last two in four different ways, giving a total of 2*8+2*4 = 24.
a(3) = 216. Restricting the first step to the right then the different ways a walk can take three steps on a 2D lattice within the first quadrant are RUL, RUU, RUR, RRU, RRR. Each of these can be taken in 6 ways, the arrangements of 1,2,3. The first four walks can also be taken in eight ways on the 2D lattice, the last in four ways, giving a total of 4*8*3!+1*4*3! = 216.
a(4) = 2544. Restricting the first step to the right then the different ways a walk can take four steps on a 2D lattice within the first quadrant are RULD, RULL, RULU, RUUL, RUUU, RUUR, RURU, RURR, RURD, RRUL, RRUU, RRUR, RRRU, RRRR. Each of these can be taken in 24 ways, the arrangements of 1,2,3,4. However six of these walks are forbidden due to the collisions given in the comments. The first thirteen walks can also be taken in eight ways on the 2D lattice, the fourteenth in four ways. This gives a total number of walks of 13*8*4! - 6*8 + 4*4! = 2544.
		

Crossrefs

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

A336262 Number of self-avoiding walks on a 2-dimensional square lattice where the walk consists of steps with incrementing lengths equal to the prime numbers, from 2 to prime(n).

Original entry on oeis.org

1, 4, 12, 36, 108, 324, 972, 2876, 8364, 24124, 69116, 196916, 559604, 1585764, 4495740, 12714796, 35654620, 99686708, 278880060, 781504972, 2180418716, 6079373324, 16857930068, 46773551052, 129562831140, 358157148332
Offset: 0

Views

Author

Scott R. Shannon, Jul 15 2020

Keywords

Comments

The first time a collision with a previous step can occur is for n = 7, i.e., a walk with steps of length 2,3,5,7,11,13,17. If we consider only walks starting with one or more steps to the right followed by an upward step then a collision can occur in five ways. These are 2R->3U->5U->7U->11R->13D->17L, 2R->3U->5U->7U->11L->13D->17R, 2R->3U->5R->7R->11U->13L->17D, 2R->3U->5R->7R->11D->13L->17U, 2R->3R->5R->7R->11U->13L->17D, where the number is the step length and R,L,U,D are directions right,left,up and down on the grid. Requiring seven steps before a collision can occur is in contrast to the walk where the steps' lengths increment by 1, see A334877, which requires only six steps.

Examples

			a(1) = 4. These are the four ways one can step away from the origin on a 2D square lattice.
a(2) = 12. These consist of the two following walks:
.
        *
        |
        .
        | 3        2         3
        .      *---.---*---.---.---*
        |
*---.---*
     2
.
The first walk can be taken in eight different ways on the 2D square lattice, the second in four ways, giving a total of 12 walks.
a(7) = 2876. If we consider only walks starting with one or more steps to the right followed by an upward step, and ignoring collisions, then the total number of walks is 3^5+3^4+3^3+3^2+3^1+3^0 = 364. However, five of these are forbidden due to the collisions given in the comments, leaving 359 in total. These can be walked in eight different ways on the 2D grid. There are also the four straight walks along the axes. This gives a total of 359*8+4 = 2876 walks.
		

Crossrefs

A347506 Number of self-avoiding walks on a 2-dimensional square lattice where the walk consists of steps with incrementing lengths equal to the square numbers, from 1 to n^2.

Original entry on oeis.org

1, 4, 12, 36, 108, 324, 972, 2916, 8676, 25572, 74124, 213788, 614444, 1757012, 5001372, 14175996, 40113156, 113363284, 319328028, 897533236, 2521069708, 7052715556, 19742289948, 55129924484, 153874225436
Offset: 0

Views

Author

Scott R. Shannon, Sep 04 2021

Keywords

Comments

This sequence gives the number of self-avoiding walks on a 2-dimensional square lattice where the walk starts with a step length of 1 which then increments at each step to the next square number until the step length is n^2.
The first time a collision with a previous step can occur is for n = 8, i.e., a walk with step lengths of 1,4,9,16,25,36,49,64. For a walk with one or more initial steps to the right followed by an upward step this can occur in nine different ways. For example, consider a walk with steps of length 1,4,9,16,25 to the right, a step of length 36 upward, then a step of length 49 to the left. A step of length 64 downward would now result in a collision. Requiring eight steps before a collision is in contrast to the standard 2D square lattice SAW of A001411 where a collision can occur on the fourth step.

Examples

			a(1) = 4. These are the four directions one can step away from a point on a 2D square lattice.
a(2) = 12. These consist of the two following walks:
.
    *
    |
    .
    |
    . 4
    |        1         4
    .      *---*---.---.---.---*
    |
*---*
  1
.
The first walk can be taken in 8 different ways, the second in 4 ways, giving a total of 12 walks.
a(8) = 8676. If we consider only walks starting with one or more steps to the right followed by an upward step, and ignoring collisions, then the total number of walks is 3^6 + 3^5 + 3^4 + 3^3 + 3^2 + 3^1 + 3^0 = 1093. However, nine of these are forbidden due to the collisions given in the comments, leaving 1084 in total. These can be walked in eight different ways on the 2D grid. There are also the four straight walks along the axes. This gives a total of 1084*8 + 4 = 8676 walks.
		

Crossrefs

A336265 Number of 2D closed-loop self-avoiding paths on a square lattice where each path consists of steps with successive lengths equal to the prime numbers, from 2 to prime(2n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 56, 64, 448, 1552, 8952, 65120, 284584, 1491800, 8467816, 48961856, 307751136, 1781258728
Offset: 0

Views

Author

Scott R. Shannon, Jul 15 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 with successive lengths equal to the prime numbers. No closed loop path is possible until n = 6, i.e. prime(13) = 41. This walk consists of steps of length 2,3,5,7,11,13,17,19,23,29,31,37,41.
Similar to A010566, where only an even number of steps can form a closed loop, here only an odd number can. This is due to the requirement that the total distance stepped in each of the four directions away from the origin must be matched by an equal distance in the opposite direction. As all primes, other than 2, are odd and unique, this can only occur if the total number of steps in a given direction (other than the direction of the first step of length 2) is even. However the first single step of length 2 still requires an even number of odd length steps to return to the origin, giving an odd number of steps overall in that direction. Adding up the four directions gives an overall odd number for the total number of steps.

Examples

			a(0) to a(5) = 0 as no closed-loop walk is possible.
a(6) = 56. There are seven walks which form closed loops when considering only those which start with one or more steps to the right followed by a step upward. These walks consist of steps with lengths 2,3,5,7,11,13,17,19,23,29,31,37,41. See the attached linked text file for the images. Each of these can be walked in eight ways on a 2D square lattice, giving a total number of closed loops of 7*8 = 56.
See the attached linked text files for images of n = 7 and n = 8.
		

Crossrefs

A342800 Number of self-avoiding polygons on a 3-dimensional cubic lattice where each walk consists of steps with incrementing length from 1 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 24, 72, 0, 0, 1704, 5184, 0, 0, 193344, 600504, 0, 0, 34321512, 141520752, 0, 0, 9205815672, 37962945288, 0, 0
Offset: 1

Views

Author

Scott R. Shannon, Mar 21 2021

Keywords

Comments

This sequence gives the number of self-avoiding polygons (closed-loop self-avoiding walks) on a 3D cubic 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. Like A334720 and A335305 only n values corresponding to even triangular numbers can form closed loops. All possible paths are counted, including those that are equivalent via rotation and reflection.

Examples

			a(1) to a(6) = 0 as no self-avoiding closed-loop walk is possible.
a(7) = 24 as there is one walk which forms a closed loop which can be walked in 24 different ways on a 3D cubic lattice. These walks, and those for n(8) = 72, are purely 2-dimensional. See A334720 for images of these walks.
a(11) = 1704. These walks consist of 120 purely 2-dimensional walks and 1584 3-dimensional walks. One of these 3-dimensional walks is:
.
                                /|
                               / |                        z  y
                              /  |                        | /
                        7 +y /   |                        |/
                            /    | 8 -z                   |----- x
             6 +x          /     |
  |---.---.---.---.---.---/      |               9 +x
  |                              |---.---.---.---.---.---.---.---.---/
  | 5 +z                                                            /
  |                                                                /
  |---.---.---.---/                                               /
        4 -x     /  3 +y                                         /
                /                                               /  10 -y
                | 2 +z                                         /
                |                                             /
                | 1 +z                                       /
                X---.---.---.---.---.---.---.---.---.---.---/
                                     11 -x
.
		

Crossrefs

Showing 1-10 of 11 results. Next