OFFSET
1,1
EXAMPLE
The square spiral is numbered as follows:
.
17--16--15--14--13 .
| | .
18 5---4---3 12 29
| | | | |
19 6 1---2 11 28
| | | |
20 7---8---9--10 27
| |
21--22--23--24--25--26
.
a(1) = 2 as this is the only prime a distance of 1 unit from the origin.
a(2) = 3, a(3) = 5, a(4) = 7. All of these primes are a distance of
sqrt(2) units from the origin, so they are listed with the smaller primes first.
a(6) = 19 as this is 2 units from the origin, the same as a(5) = 11. This is the first prime that appears out of natural order as both 13 and 17 are sqrt(8) units, which is greater than 2 units, from the origin.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Aug 27 2021
STATUS
approved