# Math Help - quadratic residues

1. ## quadratic residues

is there a quick method to find all the quadratic residues mod p where p is prime?

I know that there would be p-1/2 values but how do i find them?

2. ## Re: quadratic residues

You can just work out x^2 mod p for x=1,2,3,4,5....(p-1)/2.

They will be distinct.

$x_i^2\equiv x_j^2 \mod p \Rightarrow (x_i-x_j)(x_i+x_j)\equiv 0 \mod p$

3. ## Re: Quadratic residues

It may help to know that the set of all quadratic residues $\mod p$ is a subgroup of index $2$ of $\mathbb Z_p^\times,$ the multiplicative group of the integers $\mod p.$ I've been thinking about this recently and trying to develop a group-theoretic approach to results about quadratic residues; I'll keep you informed about further progress I make.