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.

A353588 Simultaneously fill a square spiral and an infinite square array by antidiagonals with distinct nonnegative integers so that the sum of numbers in any 2 X 2 square equals a square.

Original entry on oeis.org

0, 1, 2, 6, 13, 17, 3, 16, 32, 4, 63, 375, 20, 1628, 45, 36, 43, 25189, 138507681, 3727222924, 5, 123772, 1299458
Offset: 0

Views

Author

Eric Angelini and M. F. Hasler, May 29 2022

Keywords

Comments

Each term is the smallest possible solution satisfying the constraints and such that the sequence can be extended thereafter.
We have no formal proof that the sequence is indeed well defined, i.e., infinite. However, at points which are at the corners of the square spiral or on the first row or column of the square array, one always has infinitely many solutions. It appears that this is sufficient to infinitely extend the sequence without the need of going back further than the last one of these points.
Next term a(23) >= 371885618.

Examples

			The first 22 terms form the following square spiral, going clockwise after starting at the center towards the left:
           5 ----> 123772 --> 1299458 ---> ...
      3727222924      3 ------>  16 -----> 32 ------> 4
       138507681     17    start: 0 ------> 1        63
         25189       13 <-------  6 <------ 2       375
           43 <----- 36 <------- 45 <---- 1628 <---- 20
The square array filled with the same terms starts:
     0           1           6         3       63          36     123772
     2          13          16       375       43     1299458
    17          32          20     25189      ...
     4        1628   138507681       ...
    45  3727222924         ...
     5         ...
   ...
After the initial terms (0, 1, 2), there is a single constraint on a(3), which comes from the square spiral, where 0 + 1 + 2 + a(3) must sum to a square. Since the number 1 was already used, a(3) = 6 is the smallest possible choice.
The "inner" elements of the antidiagonals, like a(4) = 13, must satisfy the constraint arising from their left, top and top-left neighbors, with which they have to sum to a square. This becomes nontrivial if they also have, at the same time, three already fixed neighbors on the square spiral. This happens when the term is not the first or last one on a straight line on the square spiral.
For example the term a(7) = 16 must at the same time satisfy 0 + 3 + 17 = x^2 (from the spiral) and 1 + 6 + 13 + a(3) = y^2 (from the array). In this case, the sum of the neighbors is the same, so there is actually only one constraint to satisfy. The smallest solution would be 5, but it turns out that this does not allow to find a solution for the next terms: the neighbors would sum to 6 and 32, respectively, which cannot be completed with the same term to two distinct squares. This can be proved by checking all possible squares s^2 up to s = 13: At this point, (s+1)^2 - s^2 = 2s+1 becomes larger than the difference of the two sums, 32 - 6 = 26. Thus, the solution 5 must be excluded at index n = 7.
Similarly, one must exclude solutions 12, 27 and 44 at index n = 10, and solution 1669 at index n = 21.
The term a(8) must satisfy 0 + 1 + 16 + a(8) = x^2 from the square spiral, and 2 + 13 + 17 + a(8) = y^2 on the antidiagonal of the square array. The smallest solution is a(8) = 32.
		

Crossrefs

Cf. A000290 (squares); A174344, A274923 (x & y coordinate of the square spiral's n-th point); A002262, A025581 (row & column number of the table's n-th entry when read by falling antidiagonals).
Cf. A337115 (square spiral such that any 2 X 2 square sums to a square).