%I #27 May 08 2026 09:22:39
%S 1,2,3,4,5,4,5,4,5,4,5,4,5,6,5,6,7,8,7,8,9,10,11,12,13,14,15,16,15,16,
%T 15,16,15,16,17,18,19,18,19,18,19,18,19,20,19,20,19,20,19,20,19,20,19,
%U 20,19,20,19,20,19,20,19,20,19,20,19,20,19,20,19,20
%N Consider the square spiral with its cells numbered starting at 0. Two players, Black and Red, take turns. When it is Black's turn, he places a knight at the smallest unoccupied cell not attacked by an existing Red knight, and when it is Red's turn, she places a knight at the smallest unoccupied cell not attacked by an existing Black knight. a(n) gives the number of pieces among the first n with a record index when placed, minus the others.
%H Rémy Sigrist, <a href="/A393236/b393236.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A393236/a393236.png">Scatterplot of the first 1000000 terms</a>
%H Rémy Sigrist, <a href="/A393236/a393236.gp.txt">PARI program</a>
%F a(n+2) >= a(n).
%e The first terms are:
%e n a(n) |A395355(n-1)| Record?
%e -- ---- -------------- -------
%e 1 1 0 Yes
%e 2 2 1 Yes
%e 3 3 2 Yes
%e 4 4 3 Yes
%e 5 5 5 Yes
%e 6 4 4 No
%e 7 5 9 Yes
%e 8 4 6 No
%e 9 5 11 Yes
%e 10 4 10 No
%e 11 5 15 Yes
%e 12 4 12 No
%e 13 5 20 Yes
%e 14 6 24 Yes
%e 15 5 21 No
%o (PARI) \\ See Links section.
%Y Cf. A392177, A395355, A395818.
%K nonn
%O 1,2
%A _Rémy Sigrist_, May 07 2026