For instance with two variables: $ax + by = c$, where x and y are variables.
I found these two threads [1, 2], where the solution is equal to $\binom{n+p-1}{p-1}$, where n is the desired sum and p is the number of variables, so for the case above it would be $\binom{c+2-1}{2-1}$. This is then divided by the product of the numbers multiplying the variables, so in this case by $a*b$. If the result is not an integer, it's rounded down. All in all: $\lfloor\frac{\binom{c+2-1}{2-1}}{ab}\rfloor$.
This works for many equations, but I have found one where it doesn't, and I have no idea why and how to solve it. The problematic equation is the following: $$54x+177y=81630.$$
Here the number of solutions should be 26, the solution above however gives 8. How do I get to 26?
$5x+9y=600$ for instance has 14 different solutions, including x=120,y=0. Using the algorithm with dividing the equation by gcd(a,b), then using binomial coefficient and rounding down, you get 13. If you add 1 becouse a solution for x or y == 0 exists, you get 14, which is correct. It also works for $18x+59y=27210*18$.
It does not help with $18x+59y=27210$, that does not contain such solution though.
– Drejk Nov 18 '18 at 04:53