Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@KConrad I guess psychologically the kernel has to be $\mathbf{Z}/(a,b)\mathbf{Z}$ and the cokernel $U(\mathbf{Z}/(a,b)\mathbf{Z})$? I agree that I should have written $1$, somehow I am used to modules, hence additive notation.
@KConrad: as for the "nice 4-term" sequence which you mention, is it $$0\rightarrow \ker\rightarrow U(\mathbf{Z}/ab\mathbf{Z})\rightarrow U(\mathbf{Z}/a\mathbf{Z})\times U(\mathbf{Z}/b\mathbf{Z})\rightarrow \operatorname{Coker}\rightarrow 0$$? +1 for mentioning this very nice proof