%I N1903 #43 Jul 23 2023 08:49:38
%S 0,8,24,112,560,2976,16464,94016,549648,3273040,19781168,121020960,
%T 748039552,4664263744,29303071680,185307690240,1178635456752,
%U 7535046744864,48392012257184,312061600211680,2019822009608592,13117263660884768,85447982919036736
%N Number of 2n-step 2-dimensional closed self-avoiding paths on square lattice.
%C a(n) = 4n*A002931(n). There are (2n) choices for the starting point and 2 choices for the orientation, in order to produce self-avoiding closed paths from a polygon of perimeter 2n. - _Philippe Flajolet_, Nov 22 2003
%D B. D. Hughes, Random Walks and Random Environments, Oxford 1995, vol. 1, p. 461.
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%H Felix A. Pahl, <a href="/A010566/b010566.txt">Table of n, a(n) for n = 1..55</a> (from Iwan Jensen's computations of A002931, using a(n)=4n*A002931(n))
%H M. E. Fisher and D. S. Gaunt, <a href="http://dx.doi.org/10.1103/PhysRev.133.A224">Ising model and self-avoiding walks on hypercubical lattices and high density expansions</a>, Phys. Rev. 133 (1964) A224-A239.
%H 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 P. Flajolet and R. Sedgewick, <a href="http://algo.inria.fr/flajolet/Publications/books.html">Analytic Combinatorics</a>, 2009; see page 364.
%H A. J. Guttmann and I. G. Enting, <a href="https://doi.org/10.1088/0305-4470/21/3/009">The size and number of rings on the square lattice</a>, J. Phys. A 21 (1988), L165-L172.
%H Brian Hayes, <a href="http://bit-player.org/wp-content/extras/bph-publications/AmSci-1998-07-Hayes-self-avoidance.pdf">How to avoid yourself</a>, American Scientist 86 (1998) 314-319.
%H 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 Iwan Jensen, <a href="https://web.archive.org/web/20151222163324/http://www.ms.unimelb.edu.au/~iwan/saw/SAW_ser.html">Series Expansions for Self-Avoiding Walks</a>
%H G. S. Rushbrooke and J. Eve, <a href="http://dx.doi.org/10.1063/1.1730595">On Noncrossing Lattice Polygons</a>, Journal of Chemical Physics, 31 (1959), 1333-1334.
%t A002931 = Cases[Import["https://oeis.org/A002931/b002931.txt", "Table"], {_, _}][[All, 2]]; a[n_] := 4n A002931[[n]];
%t a /@ Range[55] (* _Jean-François Alcover_, Jan 11 2020 *)
%o (Python)
%o # _Alex Nisnevich_, Jul 22 2023
%o def num_continuations(path, dist):
%o (x, y) = path[-1]
%o next = [(x+1, y), (x-1, y), (x, y+1), (x, y-1)]
%o if dist == 1:
%o return (0, 0) in next
%o else:
%o return sum(num_continuations(path + [c], dist - 1) for c in next if c not in path)
%o def A010566(n):
%o return 4 * num_continuations([(0, 0), (1, 0)], 2 * n - 1) if n >= 2 else 0
%Y Cf. A002931.
%K nonn,nice,walk
%O 1,2
%A _N. J. A. Sloane_