# Quadratic residues and index w.r.t. primitive root of a odd prime p

I have a problem in solving my number theory homework. My question is as follows:

Let $p$ be an odd prime. Prove that $a$ is a quadratic residue mod $p$ if and only if the $I_{g}$$x$$$ (index with respect to any primitive root of $p$) is even.

Please edit my writing. Thanks. Does anyone know where to start? Thank you very much for everything!

-

HINT $\$ Let $\rm\:c\:$ be a primitive root. If $\rm\ a \equiv b^2\:$ and $\rm\ b \equiv c^k\$ then $\rm\ a \equiv (\cdots)^2\$ so $\rm\:a\:$ has even index. Conversely suppose $\rm\:a\:$ has even index $\rm\ I_c(a) = 2\ k\:.\:$ Then $\rm\ a \equiv (\cdots)^2\$ so $\rm\:a\:$ is a quadratic residue.
Essentially the proof boils down to the identity $\rm\ (c^k)^2\ \equiv\ c^{\:2\: k}\:.\$ It easily generalizes from $\rm\ 2\to n\:.$
@Kira: Do you mean the index of $-1\:,\:$ i.e. $\rm\ I_g(-1)\$? – Bill Dubuque Mar 5 '11 at 19:46
@Kira: That's better. Hint: $\rm\ x = g^{(p-1)/2}\ \Rightarrow\ x^2\equiv 1\:.\$ But $\rm\ x\not\equiv 1\ \Rightarrow\ x \equiv\ \cdots$ – Bill Dubuque Mar 5 '11 at 22:10