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”).

Spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the four integers forming any 2 X 2 square add up to a prime.
14

%I #31 Aug 30 2020 02:29:47

%S 0,1,2,4,3,6,5,8,10,7,11,9,12,14,17,13,15,16,18,24,19,23,25,28,22,20,

%T 30,31,32,26,21,38,33,37,34,27,29,36,40,35,50,44,39,47,42,41,43,46,49,

%U 45,53,48,54,56,59,51,52,55,65,57,64,58,60,63,61,70,62,73,75,67

%N Spiral on a 2D square lattice, one term per cell, starting at the origin with 0; the four integers forming any 2 X 2 square add up to a prime.

%C This is (by definition) the lexicographically earliest permutation of the nonnegative integers with this property.

%H Jean-Marc Falcoz, <a href="/A337116/b337116.txt">Table of n, a(n) for n = 1..2757</a>

%e The four integers inside each of the four 2 X 2 squares that contain 0 sum up to a prime: 0+1+2+4=7 / 0+4+3+6=13 / 0+6+5+8=19 / 0+8+10+1=19. This is true for any 2 X 2 square picked up on the (infinite) grid: the upper right corner below sums up to the prime 79 for instance (22+20+30+7).

%e .

%e 19--23--25--28--22--20

%e | |

%e 24 5---8--10---7 30

%e | | | .

%e 18 6 0---1 11 .

%e | | | | .

%e 16 3---4---2 9 .

%e | |

%e 15--13--17--14--12

%e .

%Y Cf. A214176, A337115 (same idea, with squares instead of primes), A337117 (with palindromes instead of primes), A337368 (with pandigitals).

%K nonn

%O 1,3

%A _Eric Angelini_ and _Jean-Marc Falcoz_, Aug 16 2020