A229764 Nim sequence of MARK: the game on n counters in which the legal moves are to remove 1 counter or to halve the number of counters and round down.
0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1, 2, 0, 1, 2, 1, 0, 2, 1, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 2, 0, 1, 0, 2, 1
Offset: 0
Keywords
Links
- Aviezri S. Fraenkel, Aperiodic Subtraction Games, The Electronic Journal of Combinatorics, 18(2) (2011).
- Eric Sopena, i-Mark: A new subtraction division game, arXiv:1509.04199 [cs.DM], 2015.
Crossrefs
Positions of zeros after a(0) given by A036554.
Programs
-
Maple
a:=proc(n) local i: option remember: if n = 0 then return 0: else for i from 0 while i in {a(n-1), a(floor(n/2))} do od: return i: fi: end:
-
Mathematica
a[0]=0; a[n_] := a[n]=(i=0; While[i==a[n-1] || i==a[Floor[n/2]], i++]; i); Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 06 2017, from Maple *)
Comments