login
A355271
Lexicographically earliest sequence of positive integers on a square spiral such that the product of adjacent pairs of numbers within each row, column and diagonal is distinct in that row, column and diagonal.
5
1, 1, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 2, 3, 4, 4, 5, 3, 2, 5, 4, 3, 5, 4, 2, 2, 3, 5, 2, 2, 4, 2, 3, 5, 4, 6, 3, 1, 1, 5, 5, 4, 1, 1, 6, 6, 2, 5, 6, 4, 5, 1, 1, 6, 4, 7, 5, 4, 1, 5, 3, 6, 2, 3, 1, 1, 3, 7, 6, 2, 7, 4, 5, 7, 3, 6, 1, 1, 4, 3, 1, 5, 2, 1, 1, 6, 5, 7, 1, 5, 3, 3, 5, 1, 1, 3, 7, 4, 6
OFFSET
1,5
COMMENTS
In the first 2 million terms the largest number is 257, while the number 37, the most commonly occurring number, appears 43477 times. Prime numbers appear more often than the composites. See the linked images.
LINKS
Scott R. Shannon, Image of the first 2 million terms. 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.
Scott R. Shannon, Distribution of a(n) for the first 2 million terms. The number 37, the most commonly occurring number, appears 43477 times. The prime numbers are shown in yellow, nonprimes in white.
EXAMPLE
The spiral begins:
.
.
3---6---4---5---3---2---4 :
| | :
1 5---4---4---3---2 2 4
| | | | |
1 3 2---1---1 4 2 6
| | | | | | |
5 2 2 1---1 3 5 1
| | | | | |
5 5 3---2---4---3 3 1
| | | |
4 4---3---5---4---2---2 5
| |
1---1---6---6---2---5---6---4
.
a(25) = 2 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) = 4. The products of adjacent pairs of numbers in a(25)'s column are 3 * 3 = 9, 3 * 4 = 12, 4 * 2 = 8, in its north-west diagonal are 4 * 1 = 4, 1 * 2 = 2, 2 * 5 = 10, and in its row are 4 * 5 = 20, 5 * 3 = 15, 3 * 4 = 12. Setting a(25) to 1 would create a product of 4 with its diagonal neighbor 4, but 4 has already occurred as a product on this diagonal. Similarly numbers 3, 4 and 5 would not be possible as they would create products with the three adjacent numbers, 3, 4, and 4, which have already occurred along the corresponding column, diagonal or row. But 2 is smaller and creates new products, namely 6, 8 and 8, with its three neighbors that have not already occurred along the corresponding column, diagonal and row.
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Jun 26 2022
STATUS
approved