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 A280026 #36 Dec 28 2016 13:50:29 %S A280026 0,1,2,3,3,4,4,5,6,5,6,7,6,7,8,9,7,8,9,10,8,9,10,11,12,9,10,11,12,13, %T A280026 10,11,12,13,14,15,11,12,13,14,15,16,12,13,14,15,16,17,18,13,14,15,16, %U A280026 17,18,19,14,15,16,17,18,19,20,21,15,16,17,18,19,20,21 %N A280026 Fill an infinite square array by following a spiral around the origin; in the n-th cell, enter the number of earlier cells that can be seen from that cell. %C A280026 The spiral track being used here is the same as in A274640, except that the starting cell here is numbered 0 (as in A274641). %C A280026 "Can be seen from" means "are on the same row, column, diagonal, or antidiagonal as". %C A280026 The entry in a cell gives the number of earlier cells that are occupied in any of the eight cardinal directions. - _Robert G. Wilson v_, Dec 25 2016 %C A280026 First occurrence of k = 0,1,2,3,...: 0, 1, 2, 3, 5, 7, 8, 11, 14, 15, 19, 23, 24, 29, 34, 35, 41, 47, 48, 55, 62, ... - _Robert G. Wilson v_, Dec 25 2016 %H A280026 Lars Blomberg, <a href="/A280026/b280026.txt">Table of n, a(n) for n = 0..10000</a> %F A280026 Empirically: a(0)=0, a(n+1)=a(n)+d for n>0, when n=k^2 or n=k*(k+1) then d=2-k, else d=1. %e A280026 The central portion of the spiral is: %e A280026 . %e A280026 7---9---8---7---6 %e A280026 | | %e A280026 8 3---3---2 7 %e A280026 | | | | %e A280026 9 4 0---1 6 %e A280026 | | | %e A280026 10 4---5---6---5 %e A280026 | %e A280026 8---9--10--11--12 ... %t A280026 a[n_] := a[n - 1] + If[ IntegerQ@ Sqrt@ n || IntegerQ@ Sqrt[4n +1], 2 - Select[{Sqrt@ n, (Sqrt[4n +1] -1)/2}, IntegerQ][[1]], 1]; a[0] = 0; Array[a, 76, 0] (* _Robert G. Wilson v_, Dec 25 2016 *) %Y A280026 See A280027 for an additive version. %Y A280026 Cf. A274640, A274641, A278354. %Y A280026 See A279211, A279212 for versions that follow antidiagonals in just one quadrant. %K A280026 nonn,tabl %O A280026 0,3 %A A280026 _N. J. A. Sloane_, Dec 24 2016 %E A280026 Corrected a(23) and more terms from _Lars Blomberg_, Dec 25 2016