Solve number puzzles using logic and math.