I've been helping students with graphing linear equations in the standard form lately, and I was wanting to come up with a way to figure out what values we could put in for one variable and get an integer for the other.

We're looking at $\displaystyle ax+by=c$, where a,b,c are known integers.

Alternately, $\displaystyle y=\frac{c-ax}{b}$

So I need to find $\displaystyle x\in\mathbb{Z}$ such that $\displaystyle c-ax=nb$ for all $\displaystyle n\in\mathbb{Z}$

I've never taken a number theory course, so please use an explanation that'll make sense to me. Thanks.