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 A336448 #20 Sep 22 2020 01:47:38 %S A336448 0,4,32,164,704,2716,9808,33788,112480,364588,1157296,3610884, %T A336448 11108448,33765276,101594000,302977204,896627936,2635423124, %U A336448 7699729296,22374323436,64702914336,186289216332,534227118960,1526445330900,4347038392480,12341626847324,34940293640400,98660244502668 %N A336448 Sum of square displacements over all n-step self-avoiding walks on a 2D square lattice. %C A336448 See A001411 for the corresponding number of n-step self-avoiding walks. %D A336448 See A001411 and A078797. %H A336448 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 A336448 I. 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> %F A336448 a(n) = Sum_{k=0..A001411(n)} ( i_k^2 + j_k^2 ) where (i_k, j_k) are the end points of all different self-avoiding n-step walks. %F A336448 a(n) = 4*A078797(n). %e A336448 a(1) = 4 as a single step of length 1 can be taken in four ways on the square lattice the sum of square end-to-end displacements is 4*1 = 4. %e A336448 a(2) = 32. The two 2-step self-avoiding walks with a first step to the right in the first quadrant with their corresponding square displacements are: %e A336448 . %e A336448 + %e A336448 | 2 +---+---+ 4 %e A336448 +---+ %e A336448 . %e A336448 The first walk can be taken in 8 ways on a square lattice, the latter in 4 ways, thus the total displacement over all 2-step walks is 8*2 + 4*4 = 32. %e A336448 a(3) = 164. The five 3-step self-avoiding walks with a first step to the right in the first quadrant with their corresponding square displacements are: %e A336448 . %e A336448 + %e A336448 +---+ | +---+ + %e A336448 | 1 + 5 | 5 | 5 +---+---+---+ 9 %e A336448 +---+ | +---+ +---+---+ %e A336448 +---+ %e A336448 . %e A336448 The first four walks can be taken in 8 ways on a square lattice, the last in 4 ways, thus the total displacement over all 3-step walks is 8*1 + 8*5 + 8*5 + 8*5 + 4*9 = 164. %Y A336448 Cf. A001411, A078797, A046661. %K A336448 nonn %O A336448 0,2 %A A336448 _Scott R. Shannon_, Jul 22 2020