OFFSET
1,2
MAPLE
mex:=proc(S) local s:
for s from 0 while member(s, S) do od:
s:
end:
GW:=proc(a, b) local i:
option remember:
mex({seq( GW(a-i, b), i=1..a), seq(GW(a, b-i), i=1..b),
seq(GW(a-i, b-i), i=1..min(a, b))}):
end:
W1:=proc(i) local b:
for b from 0 while GW(i, b)<>1 do od:
b:
end:
#W1seq(N): list L of length N such that [i, L[i]] is the
#unique position with grundy function value 1.
W1seq:=proc(N) local i:
[seq(W1(i), i=1..N)]:
end:
CROSSREFS
KEYWORD
nonn
AUTHOR
John Y. Kim, May 06 2012
STATUS
approved