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.

A018219 Table T(a,b) by antidiagonals of winning positions in 3-pile Wythoff game (a square array).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

(a,b,T(a,b)) are the winning positions in 3-pile Wythoff game. A move in k-pile Wythoff is: pick a subset of the k piles and remove the same number of stones from each. Goal: take the last stone.
T(a,b) = T(b,a). If T(a,b)=c then T(a,c)=b and T(b,c)=a.

Examples

			0 2 1 5 7 ...
2 4 0 3 1 ...
1 0 6 8 10 ...
5 3 8 1 4 ...
7 1 10 4 3 ...
T(1,1)=4, since from (114) your opponent can move to (113),(112),(111),(110),(014),(013),(004),(003). You can either win or move to (012) and win a move later.
		

Crossrefs

Rows 0-3: A002251, A018220-A018222. Main diagonal: A051261.
T(a, b)=0 iff A004481(a, b)=0 iff A002251(a)=b.

Programs

  • Mathematica
    mex[ s_ ] := Min[ Complement[ Range[ 0, Max[ {s, -1} ]+1 ], Flatten[ s ] ] ]; f[ s_ ] := Join[ s, s+Table[ i, {i, Length[ s ]} ] ]; T[ a_, b_ ] := T[ a, b ] = mex[ { f[ Table[ T[ a-i, b ], {i, a} ] ], f[ Table[ T[ a, b-i ], {i, b} ] ], f[ Table[ T[ a-i, b-i ], {i, Min[ a, b ]} ] ] } ]

Extensions

Edited and extended by Christian G. Bower, Oct 29 2002