For $p$ prime and odd I'm trying to build a non trivial semidirect group $\mathbb{Z}/p^2\mathbb{Z}\rtimes \mathbb{Z}/p\mathbb{Z}$.
So, for that, I look for the homomorphisms between $Aut\left(\mathbb{Z}/p^2\mathbb{Z}\right)$and $ \mathbb{Z}/p\mathbb{Z}$
$$Aut\left(\mathbb{Z}/p^2\mathbb{Z}\right)=\left(\mathbb{Z}/p^2\mathbb{Z}\right)^{*}=\left(\mathbb{Z}/p(p-1)\mathbb{Z}\right)= \left(\mathbb{Z}/p\mathbb{Z}\right)\times\left(\mathbb{Z}/(p-1)\mathbb{Z}\right)$$
The number of homorphism is the $\gcd(p\,,p\cdot(p-1))=p$. Then, we know there are $p-1$ non trivial homomorphism that induce a non trivial semidirect product.
My question is how can I build one of this semidirect group?
As all the elements in $\left(\mathbb{Z}/p\mathbb{Z}\right)$ have order $p$. The homomorphism $\phi$ map $$1\mapsto(a,0)\in\left(\mathbb{Z}/p\mathbb{Z}\right)\times\left(\mathbb{Z}/(p-1)\mathbb{Z}\right)$$
So $\left(\mathbb{Z}/p\mathbb{Z}\right)$ act only in the first coordinate
Is that correct?
A nontrivial semidirect product will be $\Bbb Z/p^2\Bbb Z\rtimes_{\varphi}\Bbb Z/p\Bbb Z$ for some nontrivial homomorphism $\varphi:\Bbb Z/p\Bbb Z\to{\rm Aut}(\Bbb Z/p^2\Bbb Z)=U(p^2)$. The automorphisms of $\Bbb Z/p^2\Bbb Z$ are of the form $x\mapsto ax$ for residue classes $a$ represented by integers coprime to $p$. It suffices then to find an element of multiplicative order $p$ within $U(p^2)$ to send $1\in\Bbb Z/p\Bbb Z$ to.
These elements are $1+kp$ for the integer values $k=1,\cdots,p-1$. A group presentation that works uniformly for the resulting semidirect products is $G_k:=\langle x,y:x^{p^2}=y^p=e,yxy^{-1}=x^{1+kp}\rangle$.
Let $\sigma\equiv(1+jp)/(1+kp)$ mod $p^2$. Then $x\mapsto x,y\mapsto y^{\sigma}$ induces an isomorphism $G_j\cong G_k$. Thus all of the nontrivial semidirect products are the same up to isomorphism.