primitive root confusion I found that 21 is a primitive root of 23. I wanted to find a primitive root of $529=23^2$
There is a theorem stating that if $x$ is a primitive root of $p$ and if $x^{p-1}$ is not congruent to 1 mod ($p^2)$, then $x$ is a primitive root of $p^k$.
Well $21^{22}$ is too large to work with so I reasoned that $-2$ is a primitive root mod 23. I calculated that $(-2)^{22}$ was not congruent to 1 mod 529. 
This is the part I am confused about. Does this mean that $21$ is a primitive root mod 529 or that $527$ is a primitive root mod 529?
Thanks
 A: Your calculation that showed $(-2)^{22}\not\equiv 1\pmod{23^2}$ shows that $-2$, or equivalently $527$, is a primitive root of $23^2$.
The calculation does not show that $21$ is a primitive root of $23^2$, although in fact $21$ is a primitive root of $23^2$. 
If $x\equiv 21\pmod{p}$, then $x\equiv 21+23t\pmod{23^2}$ for some $t$ in the interval $0\le t\le 22$. There is only one value of $t$ in this interval for which $21+23t$ is not a primitive root of $23^2$. (But of course $t=0$  could have been the bad one. It isn't, the bad one is $t=11$. )
A: If $a$ is a primitive root of p, then or $a$ or $p+a$ is a primitive root of $ p ^ 2$, and  this is then also a primitive root of any subsequent power of p. In fact, it is a primitive root modulo p. Then, by definition of primitive root
p-1 is the smallest exponent and divide order of $a$ . Since $a$ divide $\phi(p ^ 2)= p\cdot(p-1)$, the multiplicative order in ${Z}_{p ^ 2}^*$ , and a is a multiple p-1, and therefore can only be $(p-1)$ or the same p(p-1). In the last case, a is a primitive root of $p^2$.
A: If $p$ is a prime, and $a$ is a primitive root $\pmod p$, then $a$ is a primitive root $\mod p^n$ for all integers $n$ if and only if $a^{p-1}≠1\pmod n$. 
