Solving equations with integers