login
A338642
Square spiral of smallest distinct positive integers starting at 1 such that the four sums of each term with its four nearest neighbors are composite numbers.
3
1, 3, 5, 7, 2, 8, 4, 11, 9, 6, 12, 10, 14, 13, 15, 18, 16, 19, 17, 21, 23, 22, 24, 25, 20, 26, 28, 27, 29, 31, 32, 30, 33, 35, 34, 36, 38, 39, 37, 40, 41, 43, 42, 45, 46, 44, 47, 48, 50, 49, 51, 53, 55, 56, 54, 52, 58, 59, 57, 60, 61, 62, 63, 66, 64, 68, 65, 67, 71, 69, 72, 70, 73, 74, 76, 77, 75
OFFSET
1,2
EXAMPLE
The square spiral starts:
.
38--36--34--35--33--30--32
| |
39 16--18--15--13--14 31
| | | |
37 19 2---7---5 10 29
| | | | | |
40 17 8 1---3 12 27
| | | | |
41 21 4--11---9---6 28
| | |
43 23--22--24--25--20--26
|
42--45--46--44--47--48--50..
.
a(2) = 3 as a(1) + 3 = 1 + 3 = 4, the smallest possible composite number.
a(3) = 5 as a(2) + 5 = 3 + 5 = 8. Note a(3) cannot be 2 or 4 as when these are added to 3 the result is a prime number.
a(4) = 7 as a(3) + 7 = 5 + 7 = 12, and a(1) + 7 = 1 + 7 = 8, both being composite.
a(9) = 9 as a(8) + 9 = 11 + 9 = 20, and a(2) + 9 = 3 + 9 = 12, both being composite.
CROSSREFS
Cf. A338644 (sum to primes), A002808, A063826, A260643, A334742, A307834, A338221.
Sequence in context: A357043 A104260 A334355 * A263792 A263411 A352950
KEYWORD
nonn
AUTHOR
STATUS
approved