ASGE7I4JJ3HTHHSQKVNL74ZVZQ6WTYX6M54FYKOUE4PCPRPUNSUQC
let m = foldl max 0 $ S.unions s -- D = 2^2^m is the largest Fermat 2-power less than or equal to n
aD = Nimber $ S.filter (S.member m) s -- n = aD+b
b = Nimber $ S.filter (S.notMember m) s
a = Nimber $ S.map (S.delete m) $ getNimber aD
semiD = Nimber . S.singleton $ S.fromList [0..m-1] -- semimultiple of D
in (aD+a+b) / (semiD * a^2 + a*b + b^2)
let m = foldl max 0 $ S.unions s -- D = 2^2^m is the largest Fermat 2-power less than or equal to n
aD = Nimber $ S.filter (S.member m) s -- n = aD+b
b = Nimber $ S.filter (S.notMember m) s
a = Nimber $ S.map (S.delete m) $ getNimber aD
semiD = Nimber . S.singleton $ S.fromList [0 .. m - 1] -- semimultiple of D
in (aD + a + b) / (semiD * a ^ 2 + a * b + b ^ 2)