Number of homomorphisms Is there any way of knowing the number of homomorphisms between $2$ groups under addition modulo $n$. 
Example $\Bbb{Z}_{56}$ and $\Bbb{Z}_{30}$. I have been told it has something to do with the divisor.
 A: Here's a summary of the information you might need to consider for a question like this:


*

*Both groups are cyclic.

*Subgroups of cyclic groups are themselves cyclic.

*The image of a homomorphism $\theta:G\to H$ is a subgroup of $H$.

*The order of the image of an element under a homomorphism divides the order of that element. That is, let $\theta:G\to H$ and $g\in G$, then the order of $\theta(g)$ divides the order of $g$. 

*Generators of a cyclic group are mapped under a homomorphism to generators of the image.


This should be enough for you to get started.
A: I do not know the level of answering required. But the idea of Jorge Fernández is the good start. Let me unfold it, make it precise and let us begin with $p=56$ and $q=30$. We begin by the representations: $S=\mathbb{Z}_{56}$ (resp. $T=\mathbb{Z}_{30}$) will be represented by the classes of $\{0,1\cdots 55\}$ (resp. $\{0,1,\cdots 29\}$). 
Analysis If $\varphi\in\text{Hom}(S,T)$ then $\varphi(30\times 1)=30\varphi(1)=0$, so the images, by $\varphi$, of $\{30,60(=4),90,\cdots\}$ are all zero hence $\{0,4,\cdots\}$ and in fact the subgroup generated by $\gcd(30,56)=2$ is in the kernel of $\varphi$. 
Can you show that $\ker(\varphi)$ contains the subgroup generated by $2$ ? 
Synthesis Conversely all ''admissible'' homomorphisms are exactly the ones that annihilate on the subgroup generated by $2$ ?
Towards generality Now, we want to characterize exactly the (additive) homomorphisms from $S=\mathbb{Z}_{p}$ to $T=\mathbb{Z}_{q}$ ($p,q\geq 1$). As was said for $\varphi\in \text{Hom}(\mathbb{Z}_{p},\mathbb{Z}_{q})$, one must have yy
$$
\varphi(q\times 1)=q\varphi(1)=0
$$
Then, if $d=\gcd(p,q)$, one must have $d\varphi(1)=0$ (in $T$) and conversely. So, the homomorphisms in $\text{Hom}(\mathbb{Z}_{p},\mathbb{Z}_{q})$ are in bijection with the solutions of $d.y=0$ in $\mathbb{Z}_{q}$. This subgroup is exactly the subgroup generated by $\frac{q}{d}$
$$
\{0,\frac{q}{d},\frac{2q}{d},\cdots \frac{kq}{d},\cdots,\frac{(d-1)q}{d}\}
$$ 
Hence, the number of homorphisms is $d$.
In the previous example the possible $\varphi(1)$ are in 
$$
\{0,\frac{56}{2}\}=\{0,28\}
$$ 
Hence $2$ possible homomorphisms: $\varphi(1)=0$ (the null one) and $\varphi(1)=28$ (giving $\varphi(2n)=0,\ \varphi(2n+1)=28$).
Hope it helps otherwise do not hesitate to interact. 
A: Consider the canonical map $\pi\colon\mathbb{Z}\to\mathbb{Z}_{56}$. If you have a homomorphism $f\colon\mathbb{Z}_{56}\to\mathbb{Z}_{30}$, then $g=f\circ\pi$ is a homomorphism $g\colon\mathbb{Z}\to\mathbb{Z}_{30}$ whose kernel contains $56\mathbb{Z}$. Conversely, any homomorphism $g\colon\mathbb{Z}\to\mathbb{Z}_{30}$ whose kernel contains $56$ uniquely determines a homomorphism $f\colon\mathbb{Z}_{56}\to\mathbb{Z}_{30}$ such that $g=f\circ\pi$
On the other hand, a homomorphism $\mathbb{Z}\to\mathbb{Z}_{30}$ is determined by the image of $1$, let's say it is $k+30\mathbb{Z}$, with $0\le k<30$. Not every choice is good, because we need that
$$
56k\in 30\mathbb{Z}
$$
that is, $28k\in 15\mathbb{Z}$, so $k$ must be divisible by $15$. Thus the only possibilities are $k=0$ or $k=15$.
If, instead of $56$ we have $m$ and instead of $30$ we have $n$, the condition for a suitable $k$, with $0\le k<n$ is
$$
mk\in n\mathbb{Z}
$$
If $d=\gcd(m,n)$ is the greatest common divisor, then the condition is
$$
\frac{m}{d}k\in\frac{n}{d}\mathbb{Z}
$$
so
$$
\frac{n}{d}\mid k
$$
because $m/d$ and $n/d$ are coprime.
Thus the choices are
$$
k=0,\quad
k=\frac{n}{d},\quad
k=\frac{2n}{d},\quad
\dots,\quad
k=\frac{(d-1)n}{d}
$$
In total, $d$ homomorphisms.
