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.

A337115 Square 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 square.

Original entry on oeis.org

0, 1, 2, 6, 3, 7, 4, 5, 10, 8, 17, 16, 9, 22, 19, 21, 11, 14, 12, 13, 15, 32, 23, 26, 20, 18, 35, 40, 27, 29, 24, 38, 31, 28, 53, 36, 25, 49, 47, 48, 71, 45, 30, 54, 43, 46, 74, 76, 55, 33, 63, 80, 41, 61, 52, 39, 34, 72, 62, 65, 101, 107, 60, 75, 37, 59, 92, 68, 93, 44, 96
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 the initial 0 add up to a square: 0 + 1 + 2 + 6 = 9, 0 + 6 + 3 + 7 = 16, 0 + 7 + 4 + 5 = 16, 0 + 5 + 10 + 1 = 16. This is true for any 2 X 2 square on the (infinite) grid: the upper right corner below adds up to  81 (= 20 + 18 + 35 + 8), for instance.
.
     15--32--23--26--20--18
      |                   |
     13   4---5--10---8  35
      |   |           |   .
     12   7   0---1  17   .
      |   |       |   |   .
     14   3---6---2  16
      |               |
     11--21--19--22---9
.
		

Crossrefs

Cf. A214176, A337116 (same idea, with primes rather than squares), A337117 (with palindromes), A337368 (with pandigitals).