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
Tyler Satchel Orden, Table of n, a(n) for n = 0..10000
Achim Flammenkamp, Sprague-Grundy values of octal games.
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
KEYWORD
nonn,new
AUTHOR
Tyler Satchel Orden, Jul 12 2026
STATUS
approved
