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 A214177 #17 Dec 15 2023 14:37:14 %S A214177 20,24,32,24,44,32,56,40,44,72,52,56,88,64,68,72,108,80,84,88,128,96, %T A214177 100,104,108,152,116,120,124,128,176,136,140,144,148,152,204,160,164, %U A214177 168,172,176,232,184,188,192,196,200,204,264,212,216,220,224,228,232,296 %N A214177 Sum of the 4 nearest neighbors of n in a spiral with positive integers. %C A214177 Nearby numbers on diagonals are not counted as neighbors for this sequence. %H A214177 Rémy Sigrist, <a href="/A214177/b214177.txt">Table of n, a(n) for n = 1..5202</a> %H A214177 Rémy Sigrist, <a href="/A214177/a214177.gp.txt">PARI program for A214177</a> %F A214177 For n >= 3, a(n+1) - a(n) = 4 except if n = k^2/4 + 3*k/2 + (17 - (-1)^k)/8 for some k >= 1 then a(n+1) - a(n) = 4*k + 16 and if n = k^2/4 + 3*k/2 + (25 - (-1)^k)/8 for some k >= 0 then a(n+1) - a(n) = -4*k - 8. - _Robert Israel_, Dec 14 2023 %e A214177 Spiral begins: %e A214177 . %e A214177 49 26--27--28--29--30--31 %e A214177 | | | %e A214177 48 25 10--11--12--13 32 %e A214177 | | | | | %e A214177 47 24 9 2---3 14 33 %e A214177 | | | | | | | %e A214177 46 23 8 1 4 15 34 %e A214177 | | | | | | %e A214177 45 22 7---6---5 16 35 %e A214177 | | | | %e A214177 44 21--20--19--18--17 36 %e A214177 | | %e A214177 43--42--41--40--39--38--37 %e A214177 . %e A214177 The four nearest neighbors of 2 are 1, 3, 9, 11. Their sum is a(2) = 24. %o A214177 (PARI) See Links section. %Y A214177 Cf. A137928, A137930, A137931, A002061, A114254. %Y A214177 Cf. A214176 (sum of the 8 nearest neighbors). %K A214177 nonn,easy %O A214177 1,1 %A A214177 _Alex Ratushnyak_, Jul 06 2012