# Values without integer solutions in linear Diophantine Equation

In a linear Diophantine Equation in the form of ax+by=n.

Is it possible to find all values of n that don't have integer values for x and/or y.

For example 7x+8y=6, x and/or y don't have integer solutions

Are the values of n that don't have integer solutions infinite?

Please this is not a homework

Am just curious.

• If one restricts to $x,y \ge 0,$ it becomes the "chicken mc nuggets problem", provided $\gcd(a,b)=1.$ [and $a,b$ positive.] Then it has a more interesting answer. Jun 9 '19 at 17:07
• Are there an infinite number of solutions when x,y≥0 that have non integer solutions Jun 9 '19 at 17:12
• For fixed $n,a,b$ positive, put $x=\theta$ and solve for $y,$ where $\theta$ is irrational. Then in certain cases of $n,a,b$ there will be an infinite number of choices for irrational $\theta$ for which the resulting $y$ will be non negative. Jun 9 '19 at 18:45

$$ax+by=n$$ is a line, thus with the density of continuum.

If you take out the double integral (diophantine) solutions, which may be none, or countable (finite or infinite, depending on the bounds), then you are left, at the minimum, with $$\mathbb R \backslash \mathbb Z$$ (eventually, within the given bounds).

It has integer solutions if and only if $$\gcd(a,b)\mid n$$.

• Hi José what is that sign '|' my math is not very strong.... Thanks Jun 9 '19 at 17:05
• It's the “divides” sign. The expression $\gcd(a,b)\mid n$ means “the greatest common divider of $a$ and $b$ divides $n$”. Jun 9 '19 at 17:08
• Thanks José!!!! Jun 9 '19 at 17:09

If a and b have a common factor the both ax and by have that factor for all x and y so ax+ by has that factor. If n does not have that factor, the Diophantine equation ax+ by= n has no (integer) solutions. For example 2x+ 6y= 5 has no (integer) solutions.

• thank you I now fully understand but are the values of n with no integer solutions infinite? Jun 9 '19 at 17:08
• Given any value of n, there exist a and b which have a factor that n does not. Jun 9 '19 at 17:23