OFFSET
1,2
COMMENTS
This sequence can be seen as a two-dimensional variant of A002024.
For symmetry reasons, we obtain the same sequence when considering a clockwise or a counterclockwise square spiral, or when initially moving towards any unit direction.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10201
Rémy Sigrist, Colored representation of the spiral for -500 <= x <= 500 and -500 <= y <= 500 (where the hue is function of a(n))
Rémy Sigrist, Colored representation of the spiral for -500 <= x <= 500 and -500 <= y <= 500 (where the hue is function of a(n) mod 4)
Rémy Sigrist, PARI program for A336348
EXAMPLE
The spiral begins:
15--15--15--15--15--15---6--10--14
| |
11 11--11--11--11--11---6--10 14
| | | |
7 7 7---7---7---7---6 10 14
| | | | | |
16 12 3 3---3---2 6 10 14
| | | | | | | |
16 12 8 4 1---2 6 10 14
| | | | | | |
16 12 8 4---5---5---5 5 5
| | | | |
16 12 8---4---9---9---9---9 9
| | |
16 12---8---4--13--13--13--13--13
|
16--12---8--17--17--17--17--17--17
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 19 2020
STATUS
approved