Solving equations with integers or between consecutive integers