Let's generalise it. Suppose we have 2 positive integers such that
We'll show that if then has solutions with nonnegative integers.
If are integers ( positive, negative or 0), then the equation: always has solutions. Indeed, by just considering there are solutions. ( multiply by the modular inverse of b)
Now suppose , we'll show that, with that restriction, the solution to is unique. ( It exists and is unique)
Suppose then however and so if is multiple of ( as it is), it must be thus and from there we immediately get so the solution is unique. For the existence just consider , since we can find satisfying that condition.
Now suppose again we only had the restriction , we know that in this case the solution for integers is unique. If then must be greater than Indeed, suppose it wasn't, then we have ABSURD!
So we have found that if there's a solution in the nonnegative integers!
Now note that , so, by the unique of the representation if and x, y are integers, it follows that, if there can be no solution in the positive integers.
So the smallest integer such that for all , has a solution for nonnegative integers is