Consider the sequence of squares in modulo:

(notice a pattern?)

Notice that , so the set repeats in blocks of .

Also, so the set "reflects" as shown in this example. More clearly, for any , , therefore for all .

Both of these observations can be generalized. For any prime ,

For all appropriate

Therefore, the size of the set of residues of for any prime is at most

Sorry