I can easily find that a free presentation of $\mathbb{Z}/n$ is $\mathbb{Z}$ with $p:\mathbb{Z}\rightarrow\mathbb{Z}/n$ given by the quotient map. And obviously the kernel of this is $\ker(p)=n\mathbb{Z}$. Therefore we have a short exact sequence, $$0\rightarrow n\mathbb{Z}\xrightarrow{i}\mathbb{Z}\xrightarrow{p}\mathbb{Z}/n\rightarrow 0$$ where $i$ is the inclusion. This gives us the exact sequence, $$0\rightarrow\operatorname{Hom}(\mathbb{Z}/n,\mathbb{Z}/m)\xrightarrow{p^*}\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m)\xrightarrow{i^*}\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)$$ And we can define $\operatorname{Ext}(\mathbb{Z}/n,\mathbb{Z}/m)=\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)/\text{im}(i^*)$.
- Does the above make sense, is this the right way to approach the problem?
- If so, what is $\operatorname{Hom}(n\mathbb{Z},\mathbb{Z}/m)$ and what is the image of $i^*$?
It's better to consider $0\to\mathbb{Z}\xrightarrow{\mu_n}\mathbb{Z}\xrightarrow{p}\mathbb{Z}/n\mathbb{Z}\to 0$, where $\mu_n$ is the multiplication by $n$, because $\mu_n^*$ is again multiplication by $n$. Thus you get $$ 0\to \operatorname{Hom}(\mathbb{Z}/n\mathbb{Z},\mathbb{Z}/m\mathbb{Z}) \xrightarrow{p^*} \operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z}) \xrightarrow{\mu_n} \operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z}) $$ Now you know that $\operatorname{Hom}(\mathbb{Z},\mathbb{Z}/m\mathbb{Z})\cong\mathbb{Z}/m\mathbb{Z}$ in a “canonical” way so what you need to compute the image of $$ \mu_n\colon\mathbb{Z}/m\mathbb{Z}\to\mathbb{Z}/m\mathbb{Z} $$ which is $(n\mathbb{Z}+m\mathbb{Z})/m\mathbb{Z}=d\mathbb{Z}/m\mathbb{Z}$, where $d=\gcd(m,n)$. Finally, $\operatorname{Ext}(\mathbb{Z}/n\mathbb{Z},\mathbb{Z}/m\mathbb{Z})\cong\mathbb{Z}/d\mathbb{Z}$.