OFFSET
1,2
EXAMPLE
The square spiral starts:
.
29--42--37--52--31--28--33
| |
54 19--22--15--16--13 34
| | | |
43 24 7---4---3 10 27
| | | | | |
30 17 6 1---2 9 20
| | | | |
53 14 5--12--11---8 21
| | |
44 23--18--25--36--35--26
|
39--50--89--48--61--66--41..
.
a(2) = 2 as a(1) + 2 = 1 + 2 = 3, the smallest possible prime number.
a(3) = 3 as a(2) + 3 = 2 + 3 = 5, the next smallest possible prime number.
a(5) = 7 as a(4) + 7 = 4 + 7 = 11. Note a(5) cannot be 5 or 6 as when these are added to 4 the result is a composite number.
a(9) = 11 as a(8) + 11 = 12 + 11 = 23, and a(2) + 11 = 2 + 11 = 13, both being prime.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon and Eric Angelini, Apr 21 2021
STATUS
approved