%I #11 May 17 2026 12:43:40
%S 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,
%T 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,
%U 24,27,43,29,30,32,0,35,38,41,0,46,0,33,36,0,0,0,0
%N 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.
%C Each positive integer appears once.
%H Rémy Sigrist, <a href="/A395649/b395649.txt">Table of n, a(n) for n = 0..10000</a>
%H Rémy Sigrist, <a href="/A395649/a395649.pdf">Table of n, a(n) for n = 0..10000</a>, as in the b-file, but now the color of a(n) matches the color of the knight in cell n.
%H Rémy Sigrist, <a href="/A395649/a395649.gp.txt">PARI program</a>
%F a(A395645(k)) = 3*k-2.
%F a(A395646(k)) = 3*k-1.
%F a(A395647(k)) = 3*k.
%F a(A395648(k)) = 0.
%e The first terms alongside the square spiral are:
%e 47---0---0---0---0---0--48---0--58---0--45
%e | |
%e 0 35---0--32--30--29--43--27--24--21 55
%e | | | |
%e 50 38 12--14--25---0---0---0--22 0 42
%e | | | | | |
%e 0 41 0 0---0---0---0---0 0 0 0
%e | | | | | | | |
%e 53 0 0 0 5---4---3 10 11 0 39
%e | | | | | | | | | |
%e 0 46 0 13 6 1---2 7 0 40 44
%e | | | | | | | | |
%e 0 0 15 0 0---0---0---0 0 0 0
%e | | | | | | |
%e 0 33 28 9---0---0--16---8--19 26 52
%e | | | | |
%e 0 36 17--18--31---0--34--20--37--23 49
%e | | |
%e 0 0---0---0---0---0---0---0---0---0---0
%e |
%e 51--56--54---0--57--61--59--64--62--67--65
%o (PARI) \\ See Links section.
%Y Cf. A392177, A395486, A395506, A395645, A395646, A395647, A395648.
%K nonn
%O 0,2
%A _Rémy Sigrist_, May 03 2026