What is the cokernel of this map $\bar{1} \mapsto \bar{13}$? I am calculating the cokernel of this map: $f: \mathbb Z_9 \rightarrow \mathbb Z_{39}$ defined by $\bar{1} \mapsto \bar{13},$ I know that its image is $\{\bar{0}, \bar{13}, \bar{26}\} = 13\mathbb Z_{39} .$ Now, I know that the cokernel is defined by $\mathbb Z_{39}/\operatorname{Img} f = \mathbb Z_{39}/13\mathbb Z_{39}$ then by Lagrange theorem the number of cosets are 13. Is this correct?
I am not sure if my application of Lagrange theorem is correct: I considered my $G = \mathbb Z_{39}$ and so its order is $39$ and my $H = 13\mathbb Z_{39}$ and its order is $39/13,$ then the cokernel is isomorphic to $\mathbb Z_{13}$ is that correct?

It's correct.  Because $\Bbb Z_{39}/\langle 13\rangle\cong\Bbb Z_{13}$, not so much by Lagrange, but by, say, the first isomorphism theorem.  That is, it is the homomorphic image of the cyclic $\Bbb Z_{39}$ (so it's cyclic) and its order is $13$.
