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.

A001413 Number of 2n-step self-avoiding cycles on the cubic lattice.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Original name: Number of 2n-step polygons on the cubic lattice. "Polygons" suggests translation invariance, and/or independence of the starting point; those are counted in A001409. Here, two paths which start and end at the origin are counted as distinct if they have a different sequence of steps, even if their set of edges is the same modulo translations.
a(n) is the number of 2n-step closed self-avoiding paths on the cubic lattice. - Bert Dobbelaere, Jan 04 2019

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

Cf. A001409.
Cf. A010566 (for square lattice equivalent).
Cf. A002896 (without self-avoidance restriction).

Programs

  • Python
    def A001413(n): # For illustration; becomes slow for n >= 5.
        if not hasattr(A:=A001413, 'terms'): A.terms=[]; A.paths=((0,0,0),),
        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 += 1
                A.paths = new
            A.terms.append(cycles)
        return A.terms[n-1] if n > 1 else 0 # M. F. Hasler, Jun 17 2025

Formula

a(n) = 4*n*A001409(n). - Sean A. Irvine, Jul 27 2020

Extensions

a(11)-a(12) from Bert Dobbelaere, Jan 04 2019
a(13)-a(16) (using A001409) from Alois P. Heinz, Feb 28 2024
Name changed by M. F. Hasler, Jun 17 2025