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).

This page as a plain text file.
%I A018219 #12 Oct 10 2012 14:03:29
%S A018219 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,
%T A018219 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,
%U A018219 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
%N A018219 Table T(a,b) by antidiagonals of winning positions in 3-pile Wythoff game (a square array).
%C A018219 (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.
%C A018219 T(a,b) = T(b,a). If T(a,b)=c then T(a,c)=b and T(b,c)=a.
%e A018219 0 2 1 5 7 ...
%e A018219 2 4 0 3 1 ...
%e A018219 1 0 6 8 10 ...
%e A018219 5 3 8 1 4 ...
%e A018219 7 1 10 4 3 ...
%e A018219 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.
%t A018219 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 ]} ] ] } ]
%Y A018219 Rows 0-3: A002251, A018220-A018222. Main diagonal: A051261.
%Y A018219 T(a, b)=0 iff A004481(a, b)=0 iff A002251(a)=b.
%K A018219 nonn,tabl
%O A018219 0,2
%A A018219 _Michael Kleber_
%E A018219 Edited and extended by _Christian G. Bower_, Oct 29 2002