login
A395248
Sprague-Grundy values for the octal game .007.
1
0, 0, 0, 1, 1, 1, 2, 2, 0, 3, 3, 1, 1, 1, 0, 4, 3, 3, 3, 2, 2, 2, 4, 4, 0, 5, 5, 2, 2, 2, 3, 3, 0, 5, 0, 1, 1, 1, 3, 3, 3, 5, 6, 4, 4, 1, 0, 5, 5, 6, 6, 2, 7, 7, 7, 8, 0, 1, 9, 2, 7, 2, 3, 3, 3, 9, 0, 5, 4, 4, 8, 6, 6, 2, 7, 1, 1, 1, 0, 5, 5, 9, 3, 1, 8, 2
OFFSET
0,7
COMMENTS
In the octal game .007, a move removes exactly 3 tokens from a heap and may leave the remaining tokens as zero, one, or two nonempty heaps.
.007 is one of the unsolved octal games: whether the sequence is eventually periodic is unknown (cf. Flammenkamp's tables and R. K. Guy's list of unsolved problems in combinatorial games).
Values computed through n = 2^30 = 1073741824 by the submitter (2026), extending A. Flammenkamp's computation, which reached 2^28. The last "rare" value in Flammenkamp's sparse-space sense occurs at n = 5029983; no further rare values occur through 2^30. The maximum value through 2^30 is 1689, at n = 248902927.
LINKS
EXAMPLE
a(3) = 1: from a heap of 3 the only move removes all three tokens, reaching the zero position, so the Grundy value is mex{0} = 1.
PROG
(Python)
def gvals(N):
G = [0, 0, 0]
for n in range(3, N+1):
s = n - 3
S = {0} if n == 3 else set()
if s >= 1: S.add(G[s])
for i in range(1, s//2 + 1): S.add(G[i] ^ G[s-i])
m = 0
while m in S: m += 1
G.append(m)
return G
CROSSREFS
Cf. A002186 (Kayles), A002187 (Dawson's chess), A002188 (Grundy's game).
Sequence in context: A087508 A095731 A048142 * A071426 A288530 A295675
KEYWORD
nonn,new
AUTHOR
Tyler Satchel Orden, Jul 12 2026
STATUS
approved