OFFSET
1,2
COMMENTS
We can always extend the sequence with a prime number greater than any previous term, so the sequence is well defined.
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 -150 < x < 150 and -150 < y < 150 (where the hue is function of a(n))
Rémy Sigrist, Colored representation of the spiral for -150 < x < 150 and -150 < y < 150 (where black pixels correspond to prime numbers)
Rémy Sigrist, PARI program for A336349
EXAMPLE
The spiral begins:
85--179--173--167--133--163--157--143---18
| |
169 27---77---89---83---79---73---10 151
| | | |
181 91 31---29---15---23----8 71 149
| | | | | |
191 97 37 5----4----3 19 67 119
| | | | | | | |
193 101 25 7 1----2 9 61 139
| | | | | | |
197 95 41 6---11---13---17 49 137
| | | | |
199 103 12---43---47---35---53---59 131
| | |
161 16--107--109--113--121---65---51--127
|
22--211--221--223--227--229--203--233--115
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Jul 19 2020
STATUS
approved