OFFSET
0,4
COMMENTS
Consider array of digits 0_(1)23456789(1)0111213141516171(8)1920212223...; in this array add to n-th pointer 8*n+1 to get next pointer. E.g., n=1 so n+(8*1+1)=10 -> n=10 so n+(8*2+1)=27 -> n=27 so ... etc. - comment from Patrick De Geest.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = A033307(4*n^2-3*n-1) for n > 0. - Andrew Woods, May 20 2012
EXAMPLE
The spiral begins
2---3---2---4---2---5---2
| |
2 1---3---1---4---1 6
| | | |
2 2 4---5---6 5 2
| | | | | |
1 1 3 0 7 1 7
| | | | | | |
2 1 2---1 8 6 2
| | | | |
0 1---0---1---9 1 8
| | |
2---9---1---8---1---7 2
|
3---0---3---9
.
We begin with the 0 and wrap the numbers 1 2 3 4 ... around it. Then the sequence is obtained by reading downwards, starting from the initial 0. - Andrew Woods, May 20 2012
MATHEMATICA
nmax = 105; A033307 = Flatten[IntegerDigits /@ Range[0, nmax^2 + 10 nmax]]; a[n_] := If[n==0, 0, A033307[[4n^2 - 3n + 1]]]; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Apr 24 2017, after Andrew Woods *)
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
More terms from Patrick De Geest, Oct 15 1999
Edited by Charles R Greathouse IV, Nov 01 2009
STATUS
approved