A051261
Main diagonal of A018219, i.e., (n, n, a_n) is a winning position.
Original entry on oeis.org
0, 4, 6, 1, 3, 7, 11, 2, 5, 10, 17, 23, 21, 9, 28, 26, 24, 8, 34, 12, 35, 13, 32, 29, 44, 19, 45, 15, 18, 14, 57, 56, 16, 20, 58, 48, 25, 54, 73, 76, 72, 27, 75, 82, 62, 66, 84, 87, 71, 78, 95, 31, 74, 94, 97, 103, 22, 40, 39, 30, 86, 33, 41, 91, 46, 42, 117, 119, 122, 37
Offset: 0
-
mex[s_] := Min[Complement[Range[0, Max[{s, -1}] + 1], Flatten[s]]];
f[s_] := Join[s, s + Table[i, {i, Length[s]}]];
T[n_, k_] := T[n, k] = mex[{f[Table[T[n - i, k], {i, n}]], f[Table[T[n, k - i], {i, k}]], f[Table[T[n - i, k - i], {i, Min[n, k]}]]}];
a[n_] := T[n, n];
Table[a[n], {n, 0, 69}] (* Jean-François Alcover, Aug 19 2019, from A018219 Mma code *)
A018220
Row 1 of A018219, i.e., (1, n, a_n) is a winning position.
Original entry on oeis.org
2, 4, 0, 3, 1, 6, 5, 12, 15, 17, 14, 20, 7, 19, 10, 8, 28, 9, 31, 13, 11, 32, 38, 33, 41, 43, 40, 42, 16, 49, 51, 18, 21, 23, 53, 59, 61, 63, 22, 66, 26, 24, 27, 25, 67, 75, 68, 78, 76, 29, 79, 30, 85, 34, 88, 87, 93, 95, 97, 35, 100, 36, 98, 37, 99, 106, 39, 44, 46, 111, 114
Offset: 0
A018222
Row 3 of A018219, i.e., (3,n,a_n) is a winning position.
Original entry on oeis.org
5, 3, 8, 1, 4, 0, 9, 11, 2, 6, 18, 7, 13, 12, 27, 22, 25, 29, 10, 33, 30, 38, 15, 39, 35, 16, 44, 14, 43, 17, 20, 50, 54, 19, 57, 24, 56, 62, 21, 23, 64, 69, 63, 28, 26, 74, 76, 73, 75, 81, 31, 87, 86, 88, 32, 93, 36, 34, 91, 90, 101, 100, 37, 42, 40, 102, 106, 110, 112, 41
Offset: 0
A018221
Row 2 of A018219, i.e., (2,n,a_n) is a winning position.
Original entry on oeis.org
1, 0, 6, 8, 10, 12, 2, 7, 3, 11, 4, 9, 5, 16, 24, 23, 13, 26, 29, 34, 32, 35, 40, 15, 14, 38, 17, 47, 44, 18, 53, 48, 20, 52, 19, 21, 57, 65, 25, 61, 22, 66, 69, 67, 28, 71, 78, 27, 31, 79, 84, 82, 33, 30, 83, 90, 89, 36, 99, 95, 97, 39, 100, 103, 107, 37, 41, 43, 110, 42
Offset: 0
A002251
Start with the nonnegative integers; then swap L(k) and U(k) for all k >= 1, where L = A000201, U = A001950 (lower and upper Wythoff sequences).
Original entry on oeis.org
0, 2, 1, 5, 7, 3, 10, 4, 13, 15, 6, 18, 20, 8, 23, 9, 26, 28, 11, 31, 12, 34, 36, 14, 39, 41, 16, 44, 17, 47, 49, 19, 52, 54, 21, 57, 22, 60, 62, 24, 65, 25, 68, 70, 27, 73, 75, 29, 78, 30, 81, 83, 32, 86, 33, 89, 91, 35, 94, 96, 37, 99, 38, 102, 104, 40, 107, 109
Offset: 0
- E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 76.
- T. D. Noe, Table of n, a(n) for n = 0..10000
- Jon Asier Bárcena-Petisco, Luis Martínez, María Merino, Juan Manuel Montoya, and Antonio Vera-López, Fibonacci-like partitions and their associated piecewise-defined permutations, arXiv:2503.19696 [math.CO], 2025. See p. 18.
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- Eric Duchene, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, and Urban Larsson, Wythoff Wisdom, 43 pages, no date, unpublished.
- Eric Duchene, Aviezri S. Fraenkel, Vladimir Gurvich, Nhan Bao Ho, Clark Kimberling, and Urban Larsson, Wythoff Wisdom, unpublished, no date [Cached copy, with permission]
- Alex Meadows and B. Putman, A New Twist on Wythoff's Game, arXiv preprint arXiv:1606.06819 [math.CO], 2016.
- Gabriel Nivasch, More on the Sprague-Grundy function for Wythoff's game, pages 377-410 in "Games of No Chance 3", MSRI Publications Volume 56, 2009.
- Jeffrey Shallit, Automaton for A002251
- Jeffrey Shallit, Proving properties of some greedily-defined integer recurrences via automata theory, arXiv:2308.06544 [cs.DM], 2023.
- R. Silber, Wythoff's Nim and Fibonacci Representations, Fibonacci Quarterly #14 (1977), pp. 85-88.
- N. J. A. Sloane, Scatterplot of first 100 terms [The points are symmetrically placed about the diagonal, although that is hard to see here because the scales on the axes are different]
- Index entries for sequences that are permutations of the natural numbers
-
With[{n = 42}, {0}~Join~Take[Values@ #, LengthWhile[#, # == 1 &] &@ Differences@ Keys@ #] &@ Sort@ Flatten@ Map[{#1 -> #2, #2 -> #1} & @@ # &, Transpose@ {Array[Floor[# GoldenRatio] &, n], Array[Floor[# GoldenRatio^2] &, n]}]] (* Michael De Vlieger, Nov 14 2017 *)
-
A002251_upto(N,c=0,A=Vec(0,N))={for(n=1,N, A[n]||(#AA002251[1]=2, a(0)=0 is not included. - M. F. Hasler, Nov 27 2019, replacing earlier code from Sep 17 2014
A004481
Table of Sprague-Grundy values for Wythoff's game (Wyt Queens) read by antidiagonals.
Original entry on oeis.org
0, 1, 1, 2, 2, 2, 3, 0, 0, 3, 4, 4, 1, 4, 4, 5, 5, 5, 5, 5, 5, 6, 3, 3, 6, 3, 3, 6, 7, 7, 4, 2, 2, 4, 7, 7, 8, 8, 8, 0, 7, 0, 8, 8, 8, 9, 6, 6, 1, 6, 6, 1, 6, 6, 9, 10, 10, 7, 9, 9, 8, 9, 9, 7, 10, 10, 11, 11, 11, 10, 0, 10, 10, 0, 10, 11, 11, 11, 12, 9, 9, 12, 1, 1, 3, 1, 1, 12, 9, 9, 12
Offset: 0
Table begins
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
1, 2, 0, 4, 5, 3, 7, 8, 6, 10, 11, 9, ...
2, 0, 1, 5, 3, 4, 8, 6, 7, 11, 9, ...
3, 4, 5, 6, 2, 0, 1, 9, 10, 12, ...
4, 5, 3, 2, 7, 6, 9, 0, 1, ...
5, 3, 4, 0, 6, 8, 10, 1, ...
6, 7, 8, 1, 9, 10, 3, ...
7, 8, 6, 9, 0, 1, ...
8, 6, 7, 10, 1, ...
9, 10, 11, 12, ...
10, 11, 9, ...
11, 9, ...
12, ...
...
- E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 76.
- Eric Friedman, Scott M. Garrabrant, Ilona K. Phipps-Morgan, A. S. Landsberg and Urban Larsson, Geometric analysis of a generalized Wythoff game, in Games of no Chance 5, MSRI publ. Cambridge University Press, date?
- R. K. Guy, The unity of combinatorics, Proc. 25th Iranian Math. Conf, Tehran, (1994), Math. Appl 329 129-159, Kluwer Dordrecht 1995, Math. Rev. 96k:05001.
- Vincenzo Librandi, Table of n, a(n) for n = 0..5049
- Uri Blass and Aviezri S. Fraenkel, The Sprague-Grundy function for Wythoff's game, Theoretical Computer Science 75.3 (1990): 311-333. See Table 2.
- F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.
- A. Dress, A. Flammenkamp and N. Pink, Additive periodicity of the Sprague-Grundy function of certain Nim games, Adv. Appl. Math., 22, p. 249-270 (1999).
- Gabriel Nivasch, More on the Sprague-Grundy function for Wythoff's game, pages 377-410 in "Games of No Chance 3", MSRI Publications Volume 56, 2009. See Table 1.
- Rémy Sigrist, Colored representation of T(x,y) for x = 0..999 and y = 0..999 (where the hue is function of T(x,y) and black pixels correspond to zeros)
- Rémy Sigrist, PARI program for A004481
See
A317205 for triangle of values on or below main diagonal.
Similar to but different from
A004489.
-
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}];
Flatten@Table[t[n - m + 1, m], {n, 11}, {m, n}] (* Birkas Gyorgy, Apr 19 2011 *)
-
See Links section.
A077226
Inverse of A051261, i.e., (n, a(n), a(n)) is a winning position in 3-pile Wythoff game.
Original entry on oeis.org
0, 3, 7, 4, 1, 8, 2, 5, 17, 13, 9, 6, 19, 21, 29, 27, 32, 10, 28, 25, 33, 12, 56, 11, 16, 36, 15, 41, 14, 23, 59, 51, 22, 61, 18, 20, 73, 69, 84, 58, 57, 62, 65, 81, 24, 26, 64, 89, 35, 100, 75, 78, 76, 109, 37, 116, 31, 30, 34, 111, 126, 92, 44, 98, 86, 124, 45, 121, 94, 99
Offset: 0
Showing 1-7 of 7 results.
Comments