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.

A355270 Lexicographically earliest sequence of positive integers on a square spiral such that the sum of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.

This page as a plain text file.
%I A355270 #17 Aug 03 2022 10:48:52
%S A355270 1,1,1,1,2,2,3,2,4,3,3,4,4,3,5,4,2,4,3,5,4,4,2,3,6,4,6,5,7,6,2,6,3,2,
%T A355270 5,8,4,3,6,6,7,3,5,7,6,8,8,7,1,2,7,5,1,2,5,8,6,4,8,5,6,9,7,1,4,10,1,1,
%U A355270 6,3,9,12,5,1,7,2,1,6,4,1,13,6,4,7,9,12,10,7,11,1,5,2,10,7,4,5,8
%N A355270 Lexicographically earliest sequence of positive integers on a square spiral such that the sum of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.
%C A355270 In the first 2 million terms the largest number is 1959, while the number 1, the most commonly occurring number, appears 10893 times. See the linked images.
%H A355270 Scott R. Shannon, <a href="/A355270/a355270.png">Image of the first 2 million terms</a>. The values are scaled across the spectrum from red to violet, with the value ranges increasing towards the violet end to give more color weighting to the larger numbers.
%H A355270 Scott R. Shannon, <a href="/A355270/a355270_1.png">Distribution of a(n) for the first 2 million terms</a>. The number 1 appears 10893 times. The second maximum occurs at n ~ 500.
%e A355270 The spiral begins:
%e A355270 .
%e A355270                                 .
%e A355270     4---8---5---2---3---6---2   :
%e A355270     |                       |   :
%e A355270     3   2---4---5---3---4   6   5
%e A355270     |   |               |   |   |
%e A355270     6   4   2---1---1   4   7   2
%e A355270     |   |   |       |   |   |   |
%e A355270     6   3   2   1---1   3   5   1
%e A355270     |   |   |           |   |   |
%e A355270     7   5   3---2---4---3   6   5
%e A355270     |   |                   |   |
%e A355270     3   4---4---2---3---6---4   7
%e A355270     |                           |
%e A355270     5---7---6---8---8---7---1---2
%e A355270 .
%e A355270 a(25) = 6 as when a(25) is placed, at coordinate (2,-2) relative to the starting square, its adjacent squares are a(10) = 3, a(9) = 4, a(24) = 3. The sums of adjacent pairs of numbers in a(25)'s column are 3 + 3 = 6, 3 + 4 = 7, 4 + 4 = 8, in its northwest diagonal are 4 + 1 = 5, 1 + 2 = 3, 2 + 2 = 4, and in its row are 3 + 2 = 5, 2 + 4 = 6, 4 + 4 = 8. Setting a(25) to 1 would create a sum of 5 with its diagonal neighbor 4, but 5 has already occurred as a sum on this diagonal. Similarly numbers 2, 3, 4 and 5 can be eliminated as they create sums with the three adjacent numbers, 3, 4, and 3, which have already occurred along the corresponding column, diagonal or row. This leaves 6 as the smallest number which creates new sums, namely 9, 10 and 9, with its three neighbors that have not already occurred along the corresponding column, diagonal and row.
%Y A355270 Cf. A355271, A274640, A275609, A307834.
%K A355270 nonn
%O A355270 1,5
%A A355270 _Scott R. Shannon_, Jun 26 2022