Let $p\geq 2$ be a prime number and consider $G=(\mathbb Z/p\mathbb Z)^p$. Let's write for $a\in G:a=(a_1,\dots,a_p)$. We consider the indices modulo $p$. We have the following multiplication on $G$: $$ (a\star b)_i=a_i+b_{i+\sum_{j=1}^p a_j}. $$ You may assume that $G,\star$ is a group. Show that $$ \phi\colon G\to G\colon a\mapsto\left(\sum_{i=1}^pa_i,\dots,\sum_{i=1}^p a_i\right) $$ is a homomorphism.
I've shown that $\phi$ is indeed a homomorphism. However, I don't see how $G,\star$ is a group. Let $p=2$. Then $(\overline 0,\overline 0)\star(\overline 1, \overline 0)=(\overline 0, \overline 1)$, because we have $p_1=\overline 0$ and $p_2=\overline 1$. So $p_1+p_2=\overline 1$, which means that $(\overline 0, \overline 0)\star(\overline 1, \overline 0)=(\overline 0, \overline 0)+(\overline 0, \overline 1)=(\overline 0, \overline 1)$.
However, $(\overline 1, \overline 1)\star(\overline 1, \overline 0)= (\overline 0, \overline 1)$, because now $p_1+p_2=\overline 0$, which means that $(\overline 1, \overline 1)\star(\overline 1, \overline 0)=(\overline 1, \overline 1)+(\overline 1, \overline 0)= (\overline 0, \overline 1)$.
This shouldn't be possible in a group, so I think I haven't interpreted the group multiplication correctly?
Associativity:
$((a \star b) \star c)_i = (a \star b)_i + c_{\left[ i + \sum (a \star b)_{j} \right]} = a_i + b_{\left[ i + \sum a_j \right]} + c_{\left[ i + \sum a_j + b_{\left[ j + \sum a_k \right]} \right]}$
$(a \star (b \star c))_i = a_i + (b \star c)_{\left[ i + \sum a_{j} \right]} = a_i + b_{\left[ i + \sum a_j \right]} + c_{\left[ i + \sum a_j + \sum b_j \right]}$
And $\sum b_{\left[ j+\sum a_k \right]} = \sum b_j$ since both are just summing every coordinate of $b$.
Identity:
We claim that $0 := (0,0,\cdots,0)$ is the identity.
Inverse:
We claim that the inverse of $a := (a_1, a_2, \cdots, a_n)$ is $a' := (-a_{1-k}, -a_{2-k} \cdots, -a_{n-k})$, given by $(a')_i := -a_{i-k}$, where $k = \sum a_i$. Note that $\sum a'_i = -k$.
PS: I don't think we need $p$ to be prime.