How can you show that if $p$ is prime then the numbers with maximum possible order modulo $p^2$ is $\phi(\phi(p^2))$.
I tried finding order(a) modulo 9, and obtained the following: $1$ is $1$, $2$ is $6$,$3$ doesn't exist, $4$ is $3$, $5$ is $6$, $6$ doesn't exist, $7$ is $3$, and $8$ is $2$.
So maximum possible order is 6, and 2 and 5 have maximum possible order. Also $$\phi(\phi(3^2)) = \phi(6) = \phi(2)\phi(3) = 2$$ and so I verified that this is true. Now how do I go about proving the statement? Where do I even start?