[math-fun] Generalized gray code (answer)