A028726 Nonsquares mod 13.
2, 5, 6, 7, 8, 11
Offset: 1
Examples
Since 2 is not a perfect square and there are no solutions to x^2 = 2 mod 13, 2 is in the sequence. Although 3 is not a perfect square either, there are solutions to x^2 = 3 mod 13, such as x = 4, x = 9. Hence 3 is not in the sequence.
Crossrefs
Cf. A010376.
Programs
-
Mathematica
Select[Range[0, 12], JacobiSymbol[#, 13] == -1 &] (* Alonso del Arte, Dec 13 2019 *)
-
Scala
(0 to 12).diff((1 to 13).map(n => (n * n) % 13)) // Alonso del Arte, Dec 13 2019