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.
A274315
First row of infinite Sudoku-type array A269526.
Original entry on oeis.org
1, 3, 2, 6, 4, 5, 10, 11, 13, 8, 14, 18, 7, 20, 19, 9, 12, 24, 26, 23, 25, 29, 16, 15, 35, 31, 38, 40, 37, 39, 41, 17, 43, 42, 47, 46, 45, 52, 27, 21, 22, 51, 58, 53, 60, 50, 56, 62, 64, 63, 67, 66, 68, 73, 72, 59, 74, 28, 77, 76, 70, 71, 30, 87, 32, 83, 84, 33, 34, 89, 88, 92, 91, 36, 98, 93, 96
Offset: 1
A296339
On an infinite 60-degree sector of hexagonal graph paper, fill in cells by antidiagonals so that each contains the least nonnegative integer such that no line of edge-adjacent cells contains a repeated term.
Original entry on oeis.org
0, 1, 2, 2, 0, 1, 3, 1, 2, 4, 4, 5, 0, 3, 6, 5, 3, 4, 6, 7, 8, 6, 4, 5, 0, 3, 9, 7, 7, 8, 3, 1, 2, 4, 5, 9, 8, 6, 7, 2, 0, 1, 9, 4, 3, 9, 7, 8, 5, 1, 2, 6, 10, 11, 12, 10, 11, 6, 9, 4, 0, 8, 7, 5, 13, 14, 11, 9, 10, 12, 5, 3, 13, 6, 8, 7, 15, 16, 12, 10, 11, 7
Offset: 0
The initial rows are as follows (however, this does not show the adjancies between the cells correctly - for that, see the illustration in the link):
0;
1, 2;
2, 0, 1;
3, 1, 2, 4;
4, 5, 0, 3, 6;
5, 3, 4, 6, 7, 8;
6, 4, 5, 0, 3, 9, 7;
7, 8, 3, 1, 2, 4, 5, 9;
8, 6, 7, 2, 0, 1, 9, 4, 3;
9, 7, 8, 5, 1, 2, 6, 10, 11, 12;
10, 11, 6, 9, 4, 0, ...
...
For example, referring to the illustration in the link and NOT to the triangle here, consider the first 5 in the array. The reason this is 5 is because in the column of cells above that cell we can see 2,0,1, to the NW we see 3, and to the SW we see 4, and the smallest missing number is 5.
- Rémy Sigrist, Rows n = 0..200, flattened
- 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.
- Rémy Sigrist, Colored representation of the first 2^9 rows of the triangle
- Rémy Sigrist, PARI program for A296339
- N. J. A. Sloane, Illustration of initial rows of the sector.
Two analogs of this for an infinite square chessboard are
A269526 (which uses positive numbers) and
A274528 (which uses nonnegative numbers).
-
ab = Table[0, {13}];
nw = ab;
A296339 = Reap[For[s = 1, s <= Length[ab], s++, sw = 0; For[c = 1, c <= s, c++, x = BitOr[ab[[c]], BitOr[nw[[s-c+1]], sw]]; v = IntegerExponent[x+1, 2]; Sow[v]; p = 2^v; sw += p; ab[[c]] += p; nw[[s-c+1]] += p]]][[2, 1]] (* Jean-François Alcover, Dec 18 2017, after Rémy Sigrist *) (* I changed the first line, which was ab = Table[0, 13];, to make this compatible with older versions of MMA - N. J. A. Sloane, Feb 03 2018 *)
-
See Links section.
Original entry on oeis.org
0, 2, 1, 5, 3, 4, 9, 10, 12, 7, 13, 17, 6, 19, 18, 8, 11, 23, 25, 22, 24, 28, 15, 14, 34, 30, 37, 39, 36, 38, 40, 16, 42, 41, 46, 45, 44, 51, 26, 20, 21, 50, 57, 52, 59, 49, 55, 61, 63, 62, 66, 65, 67, 72, 71, 58, 73, 27, 76, 75, 69, 70, 29, 86, 31, 82, 83, 32, 33, 88, 87, 91, 90, 35, 97, 92, 95
Offset: 0
A330396
Permutation of the nonnegative integers partitioned into triples [3*k+2, 3*k+1, 3*k] for k >= 0.
Original entry on oeis.org
2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12, 17, 16, 15, 20, 19, 18, 23, 22, 21, 26, 25, 24, 29, 28, 27, 32, 31, 30, 35, 34, 33, 38, 37, 36, 41, 40, 39, 44, 43, 42, 47, 46, 45, 50, 49, 48, 53, 52, 51, 56, 55, 54, 59, 58, 57, 62, 61, 60, 65, 64, 63, 68, 67, 66, 71, 70, 69, 74, 73, 72, 77, 76, 75, 80, 79, 78, 83, 82
Offset: 0
Relationships:
a(n) = 2*a(n-1) - a(n-2) + 6*
A049347(n).
-
a = zeros(1,10000);
w = (-1+sqrt(-3))/2;
fprintf('0 2\n');
for n = 1:10000
a(n) = int64((3*n + 2*w^(2*n)*(w + 2) + 2*w^n*(1 - w))/3);
fprintf('%i %i\n',n,a(n));
end
A059249
Tersum n + (n-1); write n and n-1 in base 3 and add mod 3 with no carries.
Original entry on oeis.org
1, 0, 5, 7, 6, 2, 4, 3, 17, 19, 18, 23, 25, 24, 20, 22, 21, 8, 10, 9, 14, 16, 15, 11, 13, 12, 53, 55, 54, 59, 61, 60, 56, 58, 57, 71, 73, 72, 77, 79, 78, 74, 76, 75, 62, 64, 63, 68, 70, 69, 65, 67, 66, 26, 28, 27, 32, 34, 33, 29, 31, 30, 44, 46, 45, 50, 52, 51, 47, 49, 48, 35
Offset: 1
a(21)=14 since 21 and 20 are written in base 3 as 210 and 202 and so their tersum is 112 in base 3, i.e. 9+3+2=14.
A071770
Tersum n + [n/3] (answer recorded in base 10).
Original entry on oeis.org
0, 1, 2, 4, 5, 3, 8, 6, 7, 12, 13, 14, 16, 17, 15, 11, 9, 10, 24, 25, 26, 19, 20, 18, 23, 21, 22, 36, 37, 38, 40, 41, 39, 44, 42, 43, 48, 49, 50, 52, 53, 51, 47, 45, 46, 33, 34, 35, 28, 29, 27, 32, 30, 31, 72, 73, 74, 76, 77, 75, 80, 78, 79, 57, 58, 59, 61, 62, 60, 56, 54, 55, 69, 70
Offset: 0
-
a:= n-> (l-> add(irem(l[i]+l[i-1], 3)*3^(i-2),
i=2..nops(l)))([convert(n, base, 3)[], 0]):
seq(a(n), n=0..73); # Alois P. Heinz, Aug 07 2024
-
a(n)={if(n==0, 0, fromdigits((digits(n,3) + concat([0],digits(n\3,3)))%3,3))} \\ Andrew Howroyd, Aug 06 2024
-
from sympy.ntheory import digits
def a(n):
d = digits(n, 3)[1:]
return int(str(d[0]) + "".join(str((d[i]+d[i-1])%3) for i in range(1, len(d))), 3)
print([a(n) for n in range(75)]) # Michael S. Branicky, Aug 07 2024
Original entry on oeis.org
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 0, 1, 2, 3, 4, 5, 6, 7, 8, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 27, 28, 29, 30, 31, 32, 33, 34, 35, 63, 64, 65, 66
Offset: 0
A298801
Fourth column of triangular array in A296339.
Original entry on oeis.org
4, 3, 6, 0, 1, 2, 5, 9, 12, 7, 8, 15, 10, 11, 18, 13, 14, 21, 16, 17, 24, 19, 20, 27, 22, 23, 30, 25, 26, 33, 28, 29, 36, 31, 32, 39, 34, 35, 42, 37, 38, 45, 40, 41, 48, 43, 44, 51, 46, 47, 54, 49, 50, 57, 52, 53, 60, 55, 56, 63, 58, 59, 66, 61, 62, 69, 64, 65, 72, 67, 68, 75, 70, 71, 78, 73, 74, 81, 76
Offset: 0
A004499
Tersum n + 10.
Original entry on oeis.org
10, 11, 9, 13, 14, 12, 16, 17, 15, 19, 20, 18, 22, 23, 21, 25, 26, 24, 1, 2, 0, 4, 5, 3, 7, 8, 6, 37, 38, 36, 40, 41, 39, 43, 44, 42, 46, 47, 45, 49, 50, 48, 52, 53, 51, 28, 29, 27, 31, 32, 30, 34, 35, 33, 64, 65, 63, 67
Offset: 0
Showing 1-10 of 10 results.
Comments