<s>[INST] How can I check if a single equation with two variables can be solved with only integers? How can I take a single equation, $k = \frac{132-n}{6n+1}$ and check if $k$ and $n$ can be solved as integers?
In this example, it's relatively easy to figure out by inspection that $k = 10$ and $n =2$, but for others, such as $\frac{100-n}{6n+1}$, there is no integer answers. Now I don't need to actually solve for $k$ and $n$, I just need to know if it's possible to get integer solutions for any given equation.
It also might be important to note that $k$ must be greater than or equal to $1$, so $n$ must be less than $132$ or $100$ depending on the example.
 [/INST] Noodle:
$k = \frac {132-n}{6n+1}$
$6k = \frac {6\cdot 132 - 6n}{6n+1} =\frac {6\cdot 132 + 1 - (6n+1)}{6n+1}= \frac {793}{6n+1} -1$.
So $6n+1|793=13\cdot 61$ so we have $6n+1 = \pm 1,\pm 13,\pm 61,\pm 793$
So $6n = (\pm 1 - 1), (\pm 13 - 1), (\pm 61 - 1), (\pm 793 - 1)$ but $6|6n$ so we must have those terms all be multiples of $6$.
So $6n = 0, 12, 60, 792$ and $n = 0,2, 10, 132$.
And $6k= \frac {793}{6n+1} -1= \frac {793}{1,13,61,793}-1=792, 60,12,0$ all of which are divisible by $6$ so
If $n=0,2,10,132$ then $k = 132,10,2,0$.
</s>