Im trying to do an exercise in Roger Godements algebra which has me stumped.
Let $m,n$ be rational integers show there exists an integer $r$ such that $r=0\mod n$ and $r=1\mod n$ if and only if $m,n$ are coprime. Deduce from this that if $G$ is a commutative group and $x,y$ are elements of $G$ of orders $m,n$ respectively, with $m,n$ coprime then $z=xy$ has order $mn$ and the subgroup of $G$ generated by $z$ contains $x$ and $y$.
My first confusion comes from the lack of a variable $m$ in the equations for $r$. I know that I can rewrite $r=0+nm$ and $r=1+nq$ which implies that $nm =1 +nq$ but from the two modulo equations but I dont see any relation between $q,m$ that must hold (I want to say that $m-q =1 =n$ but i feel that this is wrong). Am I missing something fundamental?
For the second part I think I could relate the powers of $z$ which generate $G$ to the exponents via a substitution using the equations from part a, but i dont think i can proceed without understanding the first part.
any hints are appreciated, thanks!