OFFSET
0,3
COMMENTS
The spiral track being used here is the same as in A274640, except that the starting cell here is numbered 0 (as in A274641).
"Can be seen from" means "are on the same row, column, diagonal, or antidiagonal as".
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
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
LINKS
Lars Blomberg, Table of n, a(n) for n = 0..10000
FORMULA
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.
EXAMPLE
The central portion of the spiral is:
.
7---9---8---7---6
| |
8 3---3---2 7
| | | |
9 4 0---1 6
| | |
10 4---5---6---5
|
8---9--10--11--12 ...
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Dec 24 2016
EXTENSIONS
Corrected a(23) and more terms from Lars Blomberg, Dec 25 2016
STATUS
approved