We will be working with positive integers. I have this equation:
$$qn-qx-n+1=0$$

and I must prove that in order for it to have a solution in $\{1,2,...n\}$, $n$ must be of the form $n=aq+1$ for some $a$.

Thanks in advance