cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337116 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.

Original entry on oeis.org

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, 30, 31, 32, 26, 21, 38, 33, 37, 34, 27, 29, 36, 40, 35, 50, 44, 39, 47, 42, 41, 43, 46, 49, 45, 53, 48, 54, 56, 59, 51, 52, 55, 65, 57, 64, 58, 60, 63, 61, 70, 62, 73, 75, 67
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Aug 16 2020

Keywords

Comments

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

Examples

			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).
.
     19--23--25--28--22--20
      |                   |
     24   5---8--10---7  30
      |   |           |   .
     18   6   0---1  11   .
      |   |       |   |   .
     16   3---4---2   9   .
      |               |
     15--13--17--14--12
.
		

Crossrefs

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