Jan-13-2023, 09:48 PM
The integer solutions of
a n + b m = r
are well known mathematically. I would start from the expression of their solutions.