Number of homomorphisms from a subgroup of $S_p$ to $\mathbb Z_p$ Let $p$ be a prime number and $G < S_p$. Let $N(G)$ be te number of distinct homomorphisms from $G$ to $\mathbb Z_p$
$$
N(G) := \big|\big\{ f \mid f : G \to \mathbb Z_p \text{ with } f \text{ homomorphism} \big\}\big|
$$
What is the value of $N(G)$ as $G$ changes as a subgroup of $S_p$?

My attempt. First I noticed that there are a lot of subgroups $\simeq \mathbb Z_p$ in $S_p$ (the number of $p$-cycles is $\frac{p!}{p} = \small (p - 1)!$ so there are $\frac{(p-1)!}{\varphi(p)} = \small (p-2)!$ subgroups isomorphic to $\mathbb Z_p$), so I decided see how things change based on the number of $p$-Sylow in $G$:

*

*If there are none then all homomorphisms are trivial as there are no elements of order $p$ in $G$.

*If there is only one $p$-Sylow $P \lhd G$ then there are $p$ homomorphisms as one only has to choose where to send a generator $x$ of $P = \langle x \rangle \simeq \mathbb Z_p$.

*If there are more then all homomorphisms are trivial because all elements in the image have to commute in $\mathbb Z_p$ but in $S_p$ there are no subgroups with a copy of $\simeq\mathbb Z_p^2$.

I am not too sure about the last case, is this at least a good direction for solving this problem?
 A: If there is no non-trivial homomorphism $G\to \mathbb{Z}_p$ then $N(G)=1$, so we assume that $G$ has a quotient of order $p$. Thus $G$ has a normal $p'$-subgroup $X$, the kernel of this map, and it has index $p$. Since $P$ is a Sylow $p$-subgroup of $G$, we have that $G=XP$.
In your Step 2, you assume that $P$ is normal in $G$. Thus $G\equiv X\times P$, so $X$ centralizes $P$. But the centralizer of a $p$-cycle in $S_p$ is just the $p$-cycle itself, thus $X=1$.
In your Step 3, this is equivalent to assuming that $G$ is a semidirect product, rather than a direct product. We still have exactly $p$ distinct maps, so $N(G)=p$. In fact, such groups do not exist for non-trivial $X$, but we do not need this to see that $N(G)$ is either $1$ or $p$.
To see that a non-trivial $X$ cannot exist, note that if $X$ is transitive on $\{1,\dots,p\}$ then $p\mid |X|$, which is impossible as $X$ is a $p'$-group. Let $\Sigma$ be the partition of $\{1,\dots,p\}$ into $X$-orbits. Since $P$ normalizes $X$ it stabilizes the partition $\Sigma$. But this means that $\Sigma$ is stable under cyclic permutations of the entries. The only such partitions are into $p$ parts of size $1$ (so $X=1$) or one part of size $p$ (so $X$ is transitive).
So the conclusion is that $N(G)=1$ if and only if $|G|\neq p$, and $N(G)=p$ if $|G|=p$.
Edit: a quick clarification about $\Sigma$ being stable under cyclic permutations implying that it's a trivial partition. To see this, if $x\in \Omega\in\Sigma$, then all points of $\{1,\dots,p\}$ lie in parts of $\Sigma$ that have the same length as $\Omega$. But they add up to $p$, so either $|\Omega|=1$ or $|\Omega|=p$.
