OFFSET
1,2
LINKS
Tomas Rokicki, Table of n, a(n) for n = 1..84 (first 81 entries from Robert G. Wilson v).
Achim Flammenkamp, Sprague-Grundy Values of Grundy's Game
Gabriel Nivasch, The Sprague-Grundy theory of impartial games
Gabriel Nivasch, The Sprague-Grundy theory of impartial games [archived version]
MATHEMATICA
mex[list_] := mex[list] = Min[Complement[Range[0, Length[list]], list]];
move[grundygame, list_] := move[grundygame, list] = Union@Flatten[ Union[Table[ Sort@Join[Drop[list, {i}], {list[[i]] - j, j}], {i, Length[list]}, {j, Floor[(list[[i]] - 1)/2]}], Table[Sort@Join[Drop[list, {i}], {list[[i]] - j, j}], {i, Length[list]}, {j, Ceiling[(list[[i]] + 1)/2], list[[i]] - 1}]], 1];
SpragueGrundy[game_, list_] := SpragueGrundy[game, list] =
mex[SpragueGrundy[game, #] & /@ move[game, list]];
sg = Table[SpragueGrundy[grundygame, {i}], {i, 42}];
lst = {}; a = -1; Do[If[ss[[n]] > a, a = ss[[n]]; AppendTo[lst, n]], {n, 42}]; lst
(* Birkas Gyorgy, Apr 19 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Aug 10 2010
EXTENSIONS
a(1) corrected by Tomas Rokicki, Nov 12 2020
STATUS
approved