The following exercise is from [Birkhoff and MacLane, *A Survey of Modern Algebra*]:

> 
> For which rational numbers $x$ is $3x^2-7x$ an integer? Find necessary and sufficient conditions.
> 
> 
> 

I think I was able to obtain the set of rationals $x$, but I am not sure what the necessary and sufficient conditions are about. Here is what I tried: Suppose $3x^2-7x=k, k \in \mathbb{Z}$. Solving the quadratic, we get $x=\frac{7 \pm \sqrt{49+12k}}{6}$, whence $49+12k$ must be the square of some integer $m$. Now $m^2 \equiv 49 (\operatorname{mod} 12)$ has solutions $m = 1,5,7,11 (\operatorname{mod} 12)$, i.e. $m \in \{1,5,7,11\}+12 \mathbb{Z}$. Thus, the set of rationals $x = \frac{7 \pm m}{6}$ is $\{0,\frac{1}{3} \}+\mathbb{Z} = \{\ldots,0, \frac{1}{3}, 1, \frac{4}{3}, \ldots \}$. Is this correct? What do the necessary and sufficient conditions refer to?