[Math] For what values of $c$ does $8x + 5y = c$ have exactly one strictly positive integer solution

diophantine equations

We know that any Diophantine equation of the form $ax + by = c$ has either no solutions, or infinite solutions of the form:

$$x = x_0 + n\frac{b}{(a, b)}$$
$$y = y_0 – n\frac{a}{(a, b)}$$

Where $n$ is any integer, $(x_0, y_0)$ is one solution, and $(a, b)=\gcd(a, b)$.

I use this to attempt to answer the question to the best of my abilities, but I get stuck at one part:

By inspection, we can see that $8(2) + 5(-3) = 1$, and so $8(2c) + 5(-3c) = c$. Using the above equations, we find that:

$$x=2c + 5n$$
$$y=-3c – 8n$$

Knowing that both of these values will be above zero, we can set:

$$x >0$$
$$2c + 5n >0$$
$$n > \frac{-2c}{5}$$

And:

$$y>0$$
$$-3c-8n>0$$
$$n<\frac{-3c}{8}$$

Thus, $\frac{-2c}{5}<n<\frac{-3c}{8}$ will yield positive solutions. However, we only want one positive solution. Here's where I get stuck.

Am I able to simply say $\frac{-2c}{5}+1 =\frac{-3c}{8}$? Because it may be that the difference is slightly more than $1$, and so the value of $c$ would differ; $\frac{-2c}{5} $isn't necessarily an integer. Moreover, when I do attempt to say $\frac{-2c}{5}+1 =\frac{-3c}{8}$ anyways, I finish with $-16 < n < -15$, which leaves no answer for $n$ as an integer.

I would appreciate any help.

Best Answer

Your reasoning is correct up to the point where you deal with only one solution. While the condition of $\frac{-2c}{5}+1 = \frac{-3c}{8}$ really does guarantee that there is exactly one integer lying strictly between the lower and upper bound (assuming that $\frac{2c}{5}$ is not an integer), it's far too restrictive. For example, there is one integer between $0.99$ and $1.01$, yet both numbers differ only by $0.02$. On the other end, there is just one integer between $0.01$ and $1.99$, which differ by $1.98$.

Sometimes it's easier to ask for less and get more: Certainly, the difference between upper and lower bound must be smaller or equal to $2$, otherwise there would surely be (at least) two integers in between them. This gives us the inequality $$\frac{-3c}{8}+\frac{2c}{5}\leq 2$$ which simplifies to $c\leq 80$.

Now, here comes the tricky part. If you're interested in the actual list of numbers $c$ satisfying the "only one solution" condition, you might need to go through a bit of tedious work of checking which values of $c$ actually (it turns out to be shorter than it looks at the first glance, but still somewhat laborous).

The count of such numbers $c$ can be determined with considerably less effort thanks to this useful observation (which is not to difficult to prove): For any $1\leq c\leq 40$, exactly one of $c$ and $(c+40)$ has exactly one exactly one solution in positive integers corresponding to it. Thus, there are $40$ values of $c$ satisfying your conditions.

Related Question