I came across a problem regarding primitive roots. It asks to find all primitive roots modulo 27. I know by general theorem, there are $\phi(\phi(27)) = 6$ of them.
In order to find them all explicitly, I first find 2 is a primitive root mod 3, then using the theorem "for prime $p$, if $b$ is a primitive root mod $p$, then either $b$ or $b+p$ is a primitive root mod $p^2$", I find 2 and 5 are primitive root mod 9. These will stay as primitive root mod $3^n$ for $n>2$, but I do not know how to find the others.
To be more precise, I know 2,11,20,5,14,23 will be all primitive roots modulo 27, how could I come up with those? Also, I notice $11 = 2+1\cdot 9$ and $20 = 2+2\cdot 9$, does that mean they can be found as soon as I find 2 is a primitive root modulo 27? Why?
Thank you very much in advance.