First, note that 11 is a quadratic residue mod 2 (e.g.

Let and be odd primes. There is a result (equivalent to the law of quadratic reciprocity) that says that if and only if So you only have to determine all odd primes for which All other odd primes for which 11 is a quadratic residue will congruent to plus or miinus one of these.