Show that $n$ is a prime number Let $n\in\mathbb{N}$, $n\geq2$ and $(G,.)$ an abelian group of order $n$, with the property that for any $a\in G$, the number of endomorphisms of $G$ with $f(a)=a$ is equal to $n+1-ord(a)$, where $ord(a)$ is the order of $a$. Show that $n$ is a prime number. 


My approach is to suppose that $n$ is not prime, so there is a decomposition for $n=p_1p_2...p_k$, where $p_1,\dots ,p_k$ are prime numbers and from Cauchy's theorem there is an $a\in G$ such  that $ord(a)=p_i$. Now $f(e)=f(a^{p_i})=(f(a))^{p_i}=e$, and so the number of endomorphisms $f$ is $n+1-1=n$.

However, from the hypothesis, the number of $f$ is $n+1-p_i$, and so $n+1-p_i=n$ $\Rightarrow p_i=1$. As we chosen $p_i$ arbitrarily, we get that all the numbers $p_i,i\in{0,1,...,k}$ are $1\Rightarrow n=1$, false with $n\geq2$.


  Is my proof correct?
You haven't used the hypothesis that the group is abelian.

I corrected some points of grammar &amp; punctuation, though, too, like not starting a sentence with a mathematical symbol, adding a space after each comma, etc.
You haven't used the hypothesis that the group is abelian.

I corrected some points of grammar &amp; punctuation, though, too, like not starting a sentence with a mathematical symbol, adding a space after each comma, etc.