login
A395649
Consider the square spiral with its cells numbered starting at 0. Three players, Red, Green and Blue, take turns and place knights at the smallest unoccupied cell not attacked by an existing knight of a different color. a(n) = k if the n-th cell has been occupied at the k-th turn, a(n) = 0 otherwise.
6
1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 7, 10, 0, 0, 0, 0, 0, 0, 13, 0, 9, 0, 0, 16, 8, 19, 0, 0, 11, 0, 22, 0, 0, 0, 25, 14, 12, 0, 0, 0, 15, 28, 17, 18, 31, 0, 34, 20, 37, 23, 26, 0, 40, 0, 0, 0, 21, 24, 27, 43, 29, 30, 32, 0, 35, 38, 41, 0, 46, 0, 33, 36, 0, 0, 0, 0
OFFSET
0,2
COMMENTS
Each positive integer appears once.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000, as in the b-file, but now the color of a(n) matches the color of the knight in cell n.
Rémy Sigrist, PARI program
FORMULA
a(A395645(k)) = 3*k-2.
a(A395646(k)) = 3*k-1.
a(A395647(k)) = 3*k.
a(A395648(k)) = 0.
EXAMPLE
The first terms alongside the square spiral are:
47---0---0---0---0---0--48---0--58---0--45
| |
0 35---0--32--30--29--43--27--24--21 55
| | | |
50 38 12--14--25---0---0---0--22 0 42
| | | | | |
0 41 0 0---0---0---0---0 0 0 0
| | | | | | | |
53 0 0 0 5---4---3 10 11 0 39
| | | | | | | | | |
0 46 0 13 6 1---2 7 0 40 44
| | | | | | | | |
0 0 15 0 0---0---0---0 0 0 0
| | | | | | |
0 33 28 9---0---0--16---8--19 26 52
| | | | |
0 36 17--18--31---0--34--20--37--23 49
| | |
0 0---0---0---0---0---0---0---0---0---0
|
51--56--54---0--57--61--59--64--62--67--65
PROG
(PARI) \\ See Links section.
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 03 2026
STATUS
approved