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.
%I A001413 M5154 N2238 #44 Jun 24 2025 00:12:47 %S A001413 0,24,264,3312,48240,762096,12673920,218904768,3891176352,70742410800, %T A001413 1309643747808,24609869536800,468270744898944,9005391024862848, %U A001413 174776445357365040,3419171337633496704 %N A001413 Number of 2n-step self-avoiding cycles on the cubic lattice. %C A001413 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. %C A001413 a(n) is the number of 2n-step closed self-avoiding paths on the cubic lattice. - _Bert Dobbelaere_, Jan 04 2019 %D A001413 B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 462. %D A001413 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001413 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001413 M. E. Fisher and M. F. Sykes, <a href="http://dx.doi.org/10.1103/PhysRev.114.45">Excluded-volume problem and the Ising model of ferromagnetism</a>, Phys. Rev. 114 (1959), 45-58. %H A001413 B. J. Hiley and M. F. Sykes, <a href="http://dx.doi.org/10.1063/1.1701041">Probability of initial ring closure in the restricted random-walk model of a macromolecule</a>, J. Chem. Phys., 34 (1961), 1531-1537. %H A001413 M. F. Sykes, D. S. McKenzie, M. G. Watts, and J. L. Martin, <a href="https://doi.org/10.1088/0305-4470/5/5/007">The number of self-avoiding walks on a lattice</a>, J. Phys. A 5 (1972), 661-666. %F A001413 a(n) = 4*n*A001409(n). - _Sean A. Irvine_, Jul 27 2020 %o A001413 (Python) %o A001413 def A001413(n): # For illustration; becomes slow for n >= 5. %o A001413 if not hasattr(A:=A001413, 'terms'): A.terms=[]; A.paths=((0,0,0),), %o A001413 while n > len(A.terms): %o A001413 for L in (0,1): %o A001413 new = []; cycles = 0 %o A001413 for path in A.paths: %o A001413 end = path[-1] %o A001413 for i in (0,1,2): %o A001413 for s in (1,-1): %o A001413 t = tuple(end[j]if j!=i else end[j]+s for j in (0,1,2)) %o A001413 if t not in path: new.append(path+(t,)) %o A001413 elif L and t==path[0]: cycles += 1 %o A001413 A.paths = new %o A001413 A.terms.append(cycles) %o A001413 return A.terms[n-1] if n > 1 else 0 # _M. F. Hasler_, Jun 17 2025 %Y A001413 Cf. A001409. %Y A001413 Cf. A010566 (for square lattice equivalent). %Y A001413 Cf. A002896 (without self-avoidance restriction). %K A001413 nonn,walk,more %O A001413 1,2 %A A001413 _N. J. A. Sloane_ %E A001413 a(11)-a(12) from _Bert Dobbelaere_, Jan 04 2019 %E A001413 a(13)-a(16) (using A001409) from _Alois P. Heinz_, Feb 28 2024 %E A001413 Name changed by _M. F. Hasler_, Jun 17 2025