 In another case, testing "p" = 13, we have 17(13 − 1)/2 = 176 ≡ 1 (mod 13), therefore 17 is a quadratic residue modulo 13.As confirmation, note that 17 ≡ 4 (mod 13), and 22 = 4.We can do these calculations faster by using various modular arithmetic and Legendre symbol properties.