cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A317205 Sprague-Grundy values for Wythoff's game.

Original entry on oeis.org

0, 1, 2, 2, 0, 1, 3, 4, 5, 6, 4, 5, 3, 2, 7, 5, 3, 4, 0, 6, 8, 6, 7, 8, 1, 9, 10, 3, 7, 8, 6, 9, 0, 1, 4, 5, 8, 6, 7, 10, 1, 2, 5, 3, 4, 9, 10, 11, 12, 8, 7, 13, 14, 15, 16, 10, 11, 9, 8, 13, 12, 0, 15, 16, 17, 14, 11, 9, 10, 7, 12, 14, 2, 13, 17, 6, 18, 15
Offset: 0

Views

Author

N. J. A. Sloane, Aug 07 2018

Keywords

Examples

			Triangle begins as:
  0;
  1,  2;
  2,  0,  1;
  3,  4,  5,  6;
  4,  5,  3,  2,  7;
  5,  3,  4,  0,  6,  8;
  6,  7,  8,  1,  9, 10,  3;
  7,  8,  6,  9,  0,  1,  4,  5;
		

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 76.

Crossrefs

See A004481 for the full table.

Programs

  • Mathematica
    mex[list_] := mex[list] = Min[Complement[Range[0, Length[list]], list]];
    move[Wnim, {a_, b_}] := move[Wnim, {a, b}] =
       Union[Table[{i, b}, {i, 0, a - 1}], Table[{a, i}, {i, 0, b - 1}],
        Table[{a - i, b - i}, {i, 1, Min[a, b]}]];
    SpragueGrundy[game_, list_] := SpragueGrundy[game, list] =
       mex[SpragueGrundy[game, #] & /@ move[game, list]];
    t[n_, m_] := SpragueGrundy[Wnim, {n - 1, m - 1}]; (* so far copied from A004481 *)
    Flatten[Table[t[n, m], {n, 12}, {m,1, n}]] (* Georg Fischer, Feb 22 2020 *)

Extensions

More terms from Georg Fischer, Feb 22 2020