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.

A001412 Number of n-step self-avoiding walks on cubic lattice.

Original entry on oeis.org

1, 6, 30, 150, 726, 3534, 16926, 81390, 387966, 1853886, 8809878, 41934150, 198842742, 943974510, 4468911678, 21175146054, 100121875974, 473730252102, 2237723684094, 10576033219614, 49917327838734, 235710090502158, 1111781983442406, 5245988215191414, 24730180885580790, 116618841700433358, 549493796867100942, 2589874864863200574, 12198184788179866902, 57466913094951837030, 270569905525454674614
Offset: 0

Views

Author

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, section 5.10, pp. 331-339.
  • B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 462.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    mo = {{1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1}}; a[0] = 1;
    a[tg_, p_: {{0, 0, 0}}] := Block[{e, mv = Complement[Last[p] + # & /@ mo, p]},
    If[tg == 1, Return[Length@mv],Sum[a[tg - 1, Append[p, e]], {e, mv}]]];
    a /@ Range[0, 8]
    (* Robert FERREOL, Nov 30 2018, after the program of Giovanni Resta in A001411 *)
  • Python
    def add(L,x):
        M=[y for y in L];M.append(x)
        return(M)
    plus=lambda L,M : [x+y for x,y in zip(L,M)]
    mo=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]]
    def a(n,P=[[0,0,0]]):
        if n==0: return(1)
        mv1 = [plus(P[-1],x) for x in mo]
        mv2=[x for x in mv1 if x not in P]
        if n==1: return(len(mv2))
        else: return(sum(a(n-1,add(P,x)) for x in mv2))
    [a(n) for n in range(8)]
    # Robert FERREOL, Nov 30 2018

A002902 Number of n-step self-avoiding walks on a cubic lattice with a first step along the positive x, y, or z axis.

Original entry on oeis.org

3, 15, 75, 363, 1767, 8463, 40695, 193983, 926943, 4404939, 20967075, 99421371, 471987255, 2234455839, 10587573027, 50060937987, 236865126051, 1118861842047, 5288016609807, 24958663919367, 117855045251079, 555890991721203, 2622994107595707
Offset: 1

Views

Author

Keywords

References

  • B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 462.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Equals (1/2)*A001412. Cf. A078717, A001411, A001413.

Extensions

Name amended by Scott R. Shannon, Sep 17 2020

A038515 Number of self-avoiding walks on a tetrahedral (diamond) net, having 2n steps and forming a closed loop.

Original entry on oeis.org

1, 0, 0, 6, 12, 120, 564, 4074, 25008, 174618, 1181100, 8358306, 59167872, 427081512, 3103408308, 22797207330, 168616517760, 1256350493196
Offset: 0

Views

Author

Keywords

Crossrefs

Extensions

a(0)=1 and a(9)-a(15) from Sean A. Irvine, Jan 16 2021
a(16)-a(17) using the data from Guttmann & Jensen added by Andrey Zabolotskiy, Jun 02 2022

A010567 Number of 2n-step self-avoiding closed paths (or cycles) on the 3-dimensional cubic lattice.

Original entry on oeis.org

6, 24, 264, 3312, 48240, 762096, 12673920, 218904768, 3891176352, 70742410800, 1309643747808, 24609869536800, 468270744898944, 9005391024862848, 174776445357365040, 3419171337633496704
Offset: 1

Views

Author

Keywords

Comments

This sequence agrees with A001413 except for n=1, for which the given value is "purely conventional" (although the convention is non-standard): it counts 6 two-step closed paths, all of which visit no node twice but use an edge twice, so whether they are "self-avoiding" is indeed a matter of agreement. Same considerations apply to the first terms of A010568-A010570. - Andrey Zabolotskiy, May 29 2018

Crossrefs

Essentially the same as A001413.
Cf. A010568 (analog in 4 dimensions), A010569 (in 5D), A010570 (in 6D), A130706 (in 1D), A010566 (in 2D, different convention for n=1), A002896 (closed walks, not necessarily self-avoiding), A001412 (self-avoiding walks, not necessarily closed), A039618, A038515.

Programs

  • Python
    def A010567(n): # For illustration - becomes slow for n > 5
        if not hasattr(A:=A010567, 'terms'):
            A.terms=[6]; O=0,; A.paths=[(O*3, (1,)+O*2, t+O)for t in((2,0),(1,1))]
        while n > len(A.terms):
            for L in (0,1):
                new = []; cycles = 0
                for path in A.paths:
                    end = path[-1]
                    for i in (0,1,2):
                       for s in (1,-1):
                          t = tuple(end[j]if j!=i else end[j]+s for j in (0,1,2))
                          if t not in path: new.append(path+(t,))
                          elif L and t==path[0]: cycles += 24 if path[2][1] else 6
                A.paths = new
            A.terms.append(cycles)
        return A.terms[n-1] # M. F. Hasler, Jun 17 2025

Extensions

a(8)-a(10) copied from A001413 by Andrey Zabolotskiy, May 29 2018
a(11)-a(12) copied from A001413 by Pontus von Brömssen, Feb 28 2024
a(13)-a(16) (using A001413) from Alois P. Heinz, Feb 28 2024
Name edited and "self-avoiding" added by M. F. Hasler, Jun 17 2025

A010568 Number of 2n-step self-avoiding closed paths on the 4-dimensional cubic lattice.

Original entry on oeis.org

8, 48, 912, 22944, 652320, 20266368, 669756192, 23146172544, 827460518688, 30378237727200, 1139447186954208, 43501453488658368, 1685588678025512832
Offset: 1

Views

Author

Keywords

Comments

From M. F. Hasler, Jun 18 2025: (Start)
This sequence gives the number of self-avoiding paths starting and ending at the origin. It does not consider equivalence with respect to translations, rotations or reflections. So it does count multiple cycles whose set of edges represents the same polygon. For example, a(2) = 48 counts 4-step cycles which all correspond to a unit square.
This explains why 8n | a(n) for all n, and a(n)/8n = (1, 3, 38, 717, 16308, 422216, 11959932, 361658946, 11492507204, 379727971590, ...)
Also, a(n = 1) = 8 gives the 2-step cycles which correspond to one step in any of the 8 directions, and one step back. Although this path is self-avoiding since it does not cross any point multiple times, it uses the same edge for the first and second step, and therefore might be excluded from the counting. In three dimensions this is done in A001413, A001413(1) = 0, as opposed to A010567(1) = 6. For two dimensions, this alternate definition is also used in A010566(1) = 0.
(End)

Crossrefs

Cf. A010566, A010567, A010569, A010570 (similar for dimension 2 through 6).

Programs

  • Python
    def A010568(n): # For illustration - becomes slow for n > 5
        if not hasattr(A:=A010568, 'r'):
           A.terms = [8]; O = 0,; I = O*4, (1,*O*3)
           A.paths = (*I, (2,*O*3)), (*I, (1,1,0,0))
        while n > len(A.terms):
            for L in (0, 1):
                new=[]; cycles = 0; O=(0,)*4; I = 0,1,2,3
                for path in A.paths:
                    end = path[-1]; weight = 48 if path[2][1] else 8
                    for i in I:
                       for s in (1, -1):
                          t = tuple(end[j]if j!=i else end[j]+s for j in I)
                          if t not in path: new.append(path+(t,))
                          elif L and t==O: cycles += weight
                A.paths = new
            A.terms.append(cycles)
        return A.terms[n-1] # M. F. Hasler, Jun 17 2025

Formula

For all n, a(n) is divisible by 8*n. - M. F. Hasler, Jun 18 2025

Extensions

a(6)-a(8) from Sean A. Irvine, May 31 2018
a(9)-a(10) from Sean A. Irvine, Aug 09 2020
"Self-avoiding" inserted in definition by M. F. Hasler, Jun 18 2025
a(11)-a(13) from Clisby et al.'s data added by Andrei Zabolotskii, Jun 25 2025

A001409 Number of 2n-step polygons on cubic lattice.

Original entry on oeis.org

1, 0, 3, 22, 207, 2412, 31754, 452640, 6840774, 108088232, 1768560270, 29764630632, 512705615350, 9005206632672, 160810554015408, 2912940755956084, 53424552150523386
Offset: 0

Views

Author

Keywords

Examples

			From _M. F. Hasler_, Jun 17 2025: (Start)
For n = 2, the three 4-step polygons are the 1 X 1 squares orthogonal to one of the three coordinate axes. (The sequence counts the polygons up to translations.)
For n = 3, the 22 six-step polygons can be partitioned into:
  - six 2 X 1 rectangles (two in each of the previously considered planes);
  - twelve L- or "seat" shaped polygons (as one can get by gluing together two 1 X 1 squares in a 90 degree angle along one side, or by folding a 2 X 1 rectangle by 90 degrees along the common side of its 1 X 1 square halves): choose one of the six half axes for the orientation of one of the squares, and one of the four orthogonal axes for the other, then divide by two because the order of the two choices doesn't matter;
  - four polygons obtained by making three steps in direction of distinct axes (e.g., in direction of the three unit vectors) and then the same three steps in the opposite direction. The four inequivalent instances are obtained by rotating one of them three times by 90° around the same fixed axis. (End)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

More terms from R. J. Mathar, Aug 31 2007

A001667 2n-step polygons on b.c.c. lattice.

Original entry on oeis.org

96, 1776, 43776, 1237920, 37903776, 1223681760, 41040797376, 1416762272736, 50027402384640, 1799035070369856
Offset: 2

Views

Author

Keywords

Comments

Number of 2n-step closed self-avoiding walks starting from the origin. - Bert Dobbelaere, Jan 16 2019

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

a(9)-a(10) from Bert Dobbelaere, Jan 16 2019
a(11) from Butera & Comi added by Andrey Zabolotskiy, Jun 02 2022

A140476 Number of self-avoiding walks on cubic lattice with no more than n steps.

Original entry on oeis.org

1, 7, 37, 187, 913, 4447, 21373, 102763, 490729, 2344615, 11154493, 53088643, 251931385, 1195905895, 5664817573, 26839963627, 126961839601, 600692091703, 2838415775797, 13414448995411, 63331776834145, 299041867336303
Offset: 0

Views

Author

Jonathan Vos Post, Jun 29 2008

Keywords

Comments

Primes include a(1) = 7, a(2) = 37, a(5) = 4447, a(8) = 102763, a(15) = 26839963627.

Examples

			a(9) = 1 + 6 + 30 + 150 + 726 + 3534 + 16926 + 81390 + 387966 + 1853886 = 2344615.
		

Crossrefs

Partial sums of A001412.

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