login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A338644
Square spiral of smallest distinct positive integers starting at 1 such that the four sums of each term with its four nearest neighbors is a prime number.
1
1, 2, 3, 4, 7, 6, 5, 12, 11, 8, 9, 10, 13, 16, 15, 22, 19, 24, 17, 14, 23, 18, 25, 36, 35, 26, 21, 20, 27, 34, 33, 28, 31, 52, 37, 42, 29, 54, 43, 30, 53, 44, 39, 50, 89, 48, 61, 66, 41, 32, 47, 62, 51, 46, 55, 76, 63, 38, 45, 58, 49, 60, 67, 72, 59, 68, 83, 84, 73, 78, 95, 98, 65, 74, 57, 92
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
Cf. A338642 (sum to composites), A000040, A063826, A260643, A334742, A307834, A338221.
Sequence in context: A297441 A292959 A292957 * A132075 A265364 A265363
KEYWORD
nonn
AUTHOR
STATUS
approved