A366311 Lexicographically earliest sequence of positive integers on a square spiral such that there are no palindromes with length > 2 in any row, column or diagonal.
1, 1, 1, 1, 2, 2, 3, 2, 4, 3, 3, 4, 2, 3, 4, 4, 2, 3, 3, 4, 2, 3, 4, 4, 2, 2, 2, 5, 3, 2, 2, 2, 4, 5, 3, 2, 4, 1, 1, 5, 4, 1, 1, 1, 5, 5, 6, 1, 1, 2, 1, 5, 4, 1, 1, 3, 3, 1, 5, 5, 3, 2, 1, 3, 3, 1, 4, 5, 1, 2, 4, 3, 1, 2, 3, 5, 1, 1, 3, 3, 4, 1, 3, 6, 4, 1, 1
Offset: 1
Keywords
Examples
For a(45), first consider the west direction. The nearest cells are "1 1", so a(45) cannot be 1, as this would create "1 1 1". Next, consider the northwest direction. The nearest cells are "2 4", so a(45) cannot be 4, as this would create "4 2 4". Then, consider the north direction. From the Proof above only the 3 nearest cells need to be considered (unless the two closest are unequal, in which case only the 2 nearest). The nearest cells are "3 3 2", so a(45) cannot be 3, as this would create "3 3 3", and a(45) cannot be 2, as this would create "2 3 3 2". Last, consider the northeast direction. The nearest cells are "4 4 3", so a(45) cannot be 4 or 3, as we already know. Thus, a(45) cannot be 1, 2, 3, or 4, so a(45)=5. . 4 2 3 5 4 2 2 1 2 4 4 3 2 2 1 3 2 1 1 4 3 5 3 2 1 1 3 5 4 4 3 2 4 3 2 1 2 3 4 4 2 2 1 1 a(45) . The first 144 terms: 4---2---1---4---6---2---4---1---3---2---2---1 | 2---4---1---3---2---4---1---1---3---4---1 1 | | | 2 3---3---1---2---3---5---5---1---3 4 4 | | | | | 3 1 4---2---3---5---4---2---2 3 4 5 | | | | | | | 6 4 1 2---4---4---3---2 2 1 3 2 | | | | | | | | | 2 5 1 3 2---1---1 4 3 1 1 2 | | | | | | | | | | | 2 1 5 3 2 1---1 3 5 4 1 3 | | | | | | | | | | 3 2 4 4 3---2---4---3 2 5 4 3 | | | | | | | | 3 4 1 2---3---4---4---2---2 1 6 5 | | | | | | 5 3 1---1---5---5---6---1---1---2 3 4 | | | | 4 1---2---3---5---1---1---3---3---4---1 2 | | 3---2---2---6---4---3---2---4---4---3---2---1 .
Links
- Samuel Harkness, Table of n, a(n) for n = 1..10000
- Samuel Harkness, MATLAB program
Crossrefs
Programs
-
MATLAB
% See Harkness link.
Comments