[math-fun] Even balanced ternary