Let $n \in Z$ and define $QR_n=\{x \in Z_n|\exists y \in Z_n :y^2=x (mod\ n)\}$.
How can I show that $\forall x \in QR_n$ it hold that $|\{ y \in Z_n:y^2=x (mod\ n)\}|=\frac{n}{|QR_n|}$ ?
Why am I intersted in such result? I want to be able to say that if I choose $x \sim U(Z_n)$ then it hold that $x^2 \sim U(QR_n)$ (I am looking for a way to uniformly choose element in $QR_n$ without computing all the elements in $QR_n$ - a computer science problem...)
Thanks.