Theorem: Let p be a prime number such that p mod 4 = 3. If a is a

Some facts about quadratic residues of prime number
Theorem: Let p be a prime number such that p mod 4 = 3. If a is a quadratic
residue of p then one of the solutions that solves the equation x^2 mod p = a is
also a quadratic residue.
Example: p=19, p mod 4=3
1^2 mod 19 =1
2^2 mod 19 =4
3^2 mod 19 =9
4^2 mod 19 =16
5^2 mod 19 =6
6^2 mod 19 =17
7^2 mod 19 =11
8^2 mod 19 =7
9^2 mod 19 =5
10^2 mod 19 =5
11^2 mod 19 =7
12^2 mod 19 =11
13^2 mod 19 =17
14^2 mod 19 =6
15^2 mod 19 =16
16^2 mod 19 =9
17^2 mod 19 =4
18^2 mod 19 =1
The quadratic residues of p=19 are: 1, 4, 9, 16, 6, 17, 11, 7 and 5.
Theorem: Let p be a prime number such that p mod 4 = 1. If a is a quadratic
residue of p then either both solutions that solve the equation x^2 mod p = a are
also are quadratic residues or none of them is a quadratic residue.
Example: p=17, p mod 4=1
1^2 mod 17 =1
2^2 mod 17 =4
3^2 mod 17 =9
4^2 mod 17 =16
5^2 mod 17 =8
6^2 mod 17 =2
7^2 mod 17 =15
8^2 mod 17 =13
9^2 mod 17 =13
10^2 mod 17 =15
11^2 mod 17 =2
12^2 mod 17 =8
13^2 mod 17 =16
14^2 mod 17 =9
15^2 mod 17 =4
16^2 mod 17 =1
The quadratic residues of p=17 are: 1, 2, 4, 8, 9, 13, 15 and 16.