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 A336265 #25 Aug 31 2021 11:39:56 %S A336265 0,0,0,0,0,0,56,64,448,1552,8952,65120,284584,1491800,8467816, %T A336265 48961856,307751136,1781258728 %N A336265 Number of 2D closed-loop self-avoiding paths on a square lattice where each path consists of steps with successive lengths equal to the prime numbers, from 2 to prime(2n+1). %C A336265 This sequence gives the number of closed-loop self avoiding walks on a 2D square lattice where the walk consists of steps with successive lengths equal to the prime numbers. No closed loop path is possible until n = 6, i.e. prime(13) = 41. This walk consists of steps of length 2,3,5,7,11,13,17,19,23,29,31,37,41. %C A336265 Similar to A010566, where only an even number of steps can form a closed loop, here only an odd number can. This is due to the requirement that the total distance stepped in each of the four directions away from the origin must be matched by an equal distance in the opposite direction. As all primes, other than 2, are odd and unique, this can only occur if the total number of steps in a given direction (other than the direction of the first step of length 2) is even. However the first single step of length 2 still requires an even number of odd length steps to return to the origin, giving an odd number of steps overall in that direction. Adding up the four directions gives an overall odd number for the total number of steps. %H A336265 A. J. Guttmann, <a href="http://dx.doi.org/10.1088/0305-4470/20/7/029">On the critical behavior of self-avoiding walks</a>, J. Phys. A 20 (1987), 1839-1854. %H A336265 A. J. Guttmann and A. R. Conway, <a href="http://dx.doi.org/10.1007/PL00013842">Self-Avoiding Walks and Polygons</a>, Annals of Combinatorics 5 (2001) 319-345. %H A336265 Scott R. Shannon, <a href="/A336265/a336265.txt">Images for closed-loops for n = 6, maximum prime = 41</a>. %H A336265 Scott R. Shannon, <a href="/A336265/a336265_1.txt">Images for closed-loops for n = 7, maximum prime = 47</a>. %H A336265 Scott R. Shannon, <a href="/A336265/a336265_2.txt">Images for closed-loops for n = 8, maximum prime = 59</a>. %e A336265 a(0) to a(5) = 0 as no closed-loop walk is possible. %e A336265 a(6) = 56. There are seven walks which form closed loops when considering only those which start with one or more steps to the right followed by a step upward. These walks consist of steps with lengths 2,3,5,7,11,13,17,19,23,29,31,37,41. See the attached linked text file for the images. Each of these can be walked in eight ways on a 2D square lattice, giving a total number of closed loops of 7*8 = 56. %e A336265 See the attached linked text files for images of n = 7 and n = 8. %Y A336265 Cf. A010566, A334720, A335305, A334877, A334602. %K A336265 nonn,walk,more %O A336265 0,7 %A A336265 _Scott R. Shannon_, Jul 15 2020