OFFSET
0,2
COMMENTS
In other words, write 0 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 1 5 1 6 ... in a clockwise spiral, starting with the 0 and taking the first step south; the sequence is then picked out from the resulting spiral by starting at the origin and moving north.
LINKS
Andrew Woods, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = A033307(4*n^2 + n - 1) for n > 0. - Andrew Woods, May 18 2012
EXAMPLE
1---3---1---4---1
| |
2 4---5---6 5
| | | |
1 3 0 7 1
| | | | |
1 2---1 8 6
| | |
1---0---1---9 1
.
We begin with the 0 and wrap the numbers 1 2 3 4 ... around it.
Then the sequence is obtained by reading vertically upwards, starting from the initial 0.
MATHEMATICA
nmax = 105; A033307 = Flatten[IntegerDigits /@ Range[0, nmax^2 + 10 nmax]]; a[n_] := If[n==0, 0, A033307[[4n^2 + n + 1]]]; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Apr 24 2017, after Andrew Woods *)
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
More terms from Andrew Gacek (andrew(AT)dgi.net)
Edited by Jon E. Schoenfield, Aug 12 2018
STATUS
approved