How to find automorphism of a particular order. Given a finite  group  if  the  automorphism group  is  known  is  it  possible  to  write  down  all  the  automorphisms  with  respective  orders?
For  example say the  group $Z_{p^{2}}$  has  automorphism  group isomorphic  to  $Z_{p(p-1)}$ and I  have  to  find  an automorphism  of  order $p$, $p-1$. Now I know  that one automorphism  of  order $p$  is $y \mapsto y^{p+1}$ . But  how  to  actually find  them  out  for  this  other  groups?
 A: Below is some background on the automorphism group of any cyclic group $\mathbb{Z}/n\mathbb{Z}$, then we give a general way to find such an element of order $p$, and leave the case of powers $p-1$ for the time being.
First, note that an automorphism $\psi:\mathbb{Z}/n\mathbb{Z}\rightarrow \mathbb{Z}/n\mathbb{Z}$ is completely determined by the image of $1$. So $\psi(1)$ must be an element relatively prime to $n$, otherwise the order collapses. That is, if $\psi(1)=d$ where $\gcd(d,n)>1$, then $ord(d)<n$.
So $\psi(1)$ is relatively prime to $n$ and there are exactly $\phi(n)$ choices for the image of $1$, each of which determine a unique automorphism of the group $\mathbb{Z}/n\mathbb{Z}$. This gives $|Aut(\mathbb{Z}/n\mathbb{Z})|=\phi(n)$ and every element of the group is a map $1\mapsto r$ where $\gcd(r,n)=1$.
Let $\psi_r$ denote the map $1\mapsto r$ in $Aut(\mathbb{Z}/n\mathbb{Z})$. To calculate $ord(\psi_r)$ note $\psi_r(1)=r$, $\psi_r(\psi_r(1))=r^2$, and so forth. In this way we can define an isomorphism $Aut(\mathbb{Z}/n\mathbb{Z})\rightarrow (\mathbb{Z}/n\mathbb{Z})^\times$ by sending $\psi_r\mapsto r$.
So the problem at hand is equivalent to finding the least power $m$ such that $r^m\equiv 1 \pmod{n}$ and to find an element $r$ such that $r^m\equiv 1\pmod{n}$ with $m$ fixed.
Let's work in $\mathbb{Z}/p^2\mathbb{Z}$ for odd primes $p$ now so that the elements of $Aut(\mathbb{Z}/p^2\mathbb{Z})$ are $\{1,...,p-1,p+1,...,2p-1,2p+1,...,p^2-1\}$. We want to choose an element $r$ of the above such that when raised to the power of $p$ we get $1$.
Pick a general element $(mp+k)$ where $k\in \{1,...,p-1\}$ and $m\in \{0,...p-1\}$. By the binomial theorem we have
$$(mp+k)^p=\sum_{i=0}^p {p\choose i}(mp)^{p-i}(k)^i$$
Taking congruences modulo $p^2$ gives the last two terms
$$(mp+k)^p\equiv {p\choose p-1}(mp)k^{p-1}+k^p\equiv k^p \pmod{p^2}$$
Where the last congruence is found after calculating ${p\choose p-1}=p$. So we can check all powers $k^p\equiv 1 \pmod{p^2}$ where $k\in \{1,...,p-1\}$ and we get all others by varying $m\in \{0,...,p-1\}$.
To find at least one solution observe $k=1$ satisfies $k^p\equiv 1 \pmod{p^2}$ so that we can take any element of the set $\{1, p+1, 2p+1,..., p^2-p+1\}$.
Now for the case to the power of $p-1$ we can follow the above so that the binomial theorem gives
$$(mp+k)^{p-1}=\sum_{i=0}^{p-1}{p-1\choose i} (mp)^{p-1-i}k^i$$
Taking congruences again
$$(mp+k)^{p-1}\equiv {p-1\choose p-2}(mp)k^{p-2}+k^{p-1}=(p-1)(mp)k^{p-2}+k^{p-1}\equiv k^{p-1}-mpk^{p-2}\pmod{p^2}$$
So we want to simplify $k^{p-1}-mpk^{p-2}=(k-pm)k^{p-2}\equiv 1\pmod{p^2}$. I'm currently stuck so I'll think about this last one for a little bit.
