OFFSET
0,4
COMMENTS
Octal game .07 (Dawson's Kayles) has values a(n-1). Octal games .4, .401, .402, .403, .42, .421, .422 and .423 have values a(n-2).
REFERENCES
E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see pp. 89 and 102.
R. K. Guy and C. A. B. Smith, The G-values of various games. Proc. Cambridge Philos. Soc. 52 (1956), 514-526.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
Pratik Alladi, Neel Bhalla, Tanya Khovanova, Nathan Sheffield, Eddie Song, William Sun, Andrew The, Alan Wang, Naor Wiesel, Kevin Zhang Kevin Zhao, PRIMES STEP Plays Games, arXiv:1707.07201 [math.CO], 2017, Section 8.
Sierra Brown, Spencer Daugherty, Eugene Fiorini, Barbara Maldonado, Diego Manzano-Ruiz, Sean Rainville, Riley Waechter, and Tony W. H. Wong, Nimber Sequences of Node-Kayles Games, J. Int. Seq., Vol. 23 (2020), Article 20.3.5.
Achim Flammenkamp, Octal games
R. K. Guy, Anyone for Twopins?, in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 2-15. [Annotated scanned copy, with permission]
FORMULA
Has period 34 with the only exceptions at n=0, 14, 16, 17, 31, 34 and 51.
PROG
(Haskell)
a002187 n = a002187_list !! n
a002187_list = tail g where
g = 0 : 0 : [mex [xor (g !! (a + 1)) (g !! (n - a - 2)) |
a <- [-1 .. n - 2]] | n <- [1 ..]]
xor 0 0 = 0
xor x y = let ((q, r), (s, t)) = (divMod x 2, divMod y 2)
in (if r == t then 0 else 1) + 2 * xor q s
mex xs = head [x | x <- [0..], not (elem x xs)]
-- Paul Stoeber (pstoeber(AT)uni-potsdam.de), Oct 08 2005; edited by Reinhard Zumkeller, Dec 16 2013
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
EXTENSIONS
Edited by Christian G. Bower, Oct 22 2002
STATUS
approved