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.

Previous Showing 11-14 of 14 results.

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

A078527 Number of maximally 2-constrained walks on square lattice trapped after n steps.

Original entry on oeis.org

0, 1, 9, 7, 3, 36, 26, 13, 1, 100, 54, 19, 7, 247, 147, 68, 27, 12, 552, 294, 151
Offset: 7

Views

Author

Hugo Pfoertner, Nov 27 2002

Keywords

Comments

In a 2D self-avoiding walk there may be steps, where the number of free target positions is less than 3. A step is called k-constrained, if only k<3 neighbors were not visited before. Self-trapping occurs at step n (the next step would have k=0). A maximally 2-constrained n-step walk contains n-floor((4*n+1)^(1/2))-2 steps with k=2 (conjectured). The first step is chosen fixed (0,0)->(1,0), all other steps have k=3. This sequence counts those walks among all possible self-trapping n-step walks A077482(n).

Examples

			a(7)=0 because the unique shortest possible self-trapping walk has no constrained steps. Of the A077482(10)=25 self-trapping walks of length n=10, there are A078528(10)=5 unconstrained walks (9 steps with free choice of direction). a(10)=7 walks are maximally 2-constrained containing 2 steps with k=2. Among the remaining 13 walks there are 11 walks having 1 step with k=2 and 2 walks have 1 forced step k=1. An illustration of all unconstrained and all maximally 2-constrained 10-step walks is given in the first link under "5 Unconstrained and 7 maximally 2-constrained walks of length 10". a(15)=1 is a unique ("perfectly constrained") walk visiting all lattice points of a 4*4 square, see "Examples for walks with the maximum number of constrained steps" provided at the given link.
		

Crossrefs

Programs

  • Fortran
    c Program provided at given link

Extensions

a(24)-a(27) from Sean A. Irvine, Jul 04 2025

A078799 Sum of square displacements over all self-avoiding walks on square lattice trapped after n steps.

Original entry on oeis.org

1, 6, 35, 150, 627, 2318, 8400, 28624, 96049, 311002, 994899, 3111570, 9638347, 29398762, 88985840, 266359752, 792360385, 2337329116, 6859721431, 20000471236, 58067533570, 167703151726
Offset: 7

Views

Author

Hugo Pfoertner, Dec 26 2002

Keywords

Comments

The mean squared displacement is given by a(n)/A077482(n) See also "Average Euclidean and Squared End Point Distance" at link

Examples

			a(9)=35 because the A077482(9)=11 different self-trapping walks stop at 5*(0,1)->d^2=1, 2*(1,2)->d^2=5, 2*(2,1)->d^2=5, (-1,0)->d^2=1 (3,0)->d^2=9. a(9)=5*1+2*5+2*5+1+9=35 See "Enumeration of all short self-trapping walks" at link
		

Crossrefs

Cf. A077482, A078797, A078800 (corresponding Manhattan distance sum).

Programs

  • Fortran
    c Program for distance counting available at link.

Extensions

a(26)-a(28) from Sean A. Irvine, Jul 16 2025

A078800 Sum of end-to-end Manhattan distances over all self-avoiding walks on square lattice trapped after n steps.

Original entry on oeis.org

1, 4, 21, 72, 271, 858, 2846, 8632, 26913, 79504, 238881, 693210, 2033133, 5823100, 16794540, 47619222, 135663289, 381615476, 1077064799, 3010363236, 8434161574, 23448994128
Offset: 7

Views

Author

Hugo Pfoertner, Dec 28 2002

Keywords

Comments

The mean Manhattan displacement is given by a(n)/A077482(n) See also "Average Manhattan end point distance" and "Comparison of average Euclidean and Manhattan displacements" at link

Examples

			a(9)=21 because the A077482(9)=11 different self-trapping walk stop at 5*(0,1)->d=1, 2*(1,2)->d=3, 2*(2,1)->d=3,(-1,0)->d=1,(3,0)->d=3. a(9) = 5*1+2*3+2*3+1+3 = 21.
		

Crossrefs

Cf. A077482, A078798, A078799 (corresponding squared distance sum).

Programs

  • Fortran
    c Program for distance counting available at link.

Extensions

a(26)-a(28) from Sean A. Irvine, Jul 16 2025
Previous Showing 11-14 of 14 results.