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

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

Original entry on oeis.org

10, 80, 2160, 82720, 3737120, 186303840, 9945915840, 558476528000, 32597366872320, 1961752814181280, 121020530395783040, 7620016712806580160
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

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

Extensions

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

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
Showing 1-3 of 3 results.