login
A338367
Square spiral of nonnegative integers built by greedy algorithm such that for any (i, j) <> (0, 0) there is at most one position, say (n, k), such that the values at (n, k) and at (n+i, k+j) are the same.
1
0, 0, 0, 1, 0, 2, 1, 3, 4, 1, 3, 2, 3, 4, 5, 6, 2, 7, 4, 6, 5, 7, 8, 9, 5, 6, 7, 9, 8, 10, 7, 11, 9, 12, 8, 13, 10, 11, 14, 15, 12, 13, 10, 14, 11, 15, 16, 17, 12, 4, 13, 14, 18, 15, 6, 17, 1, 16, 19, 18, 20, 21, 22, 16, 17, 19, 20, 23, 18, 21, 24, 25, 19, 20
OFFSET
0,6
COMMENTS
This sequence is a variant of A337804.
EXAMPLE
The spiral begins:
10--13---8--12---9--11---7
| |
11 2---6---5---4---3 10
| | | |
14 7 0---1---0 2 8
| | | | | |
15 4 2 0---0 3 9
| | | | |
12 6 1---3---4---1 7
| | |
13 5---7---8---9---5---6
|
10--14--11--15--16--17--12
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A084579 A276237 A059663 * A186975 A027422 A135086
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 23 2020
STATUS
approved