login
A028734
Nonsquares mod 21.
1
2, 3, 5, 6, 8, 10, 11, 12, 13, 14, 17, 19, 20
OFFSET
1,1
EXAMPLE
Since 14 is not a perfect square and there are no solutions to x^2 = 14 mod 21, 14 is in the sequence.
Although 15 is not a perfect square either, there are solutions to x^2 = 15 mod 21, such as x = 6, x = 15. Hence 15 is not in the sequence.
MATHEMATICA
Complement[Range[20], PowerMod[Range[20], 2, 21]] (* Alonso del Arte, Nov 21 2019 *)
PROG
(Scala) val squaresMod21 = (0 to 20).map(n => n * n).map(_ % 21)
(0 to 20).diff(squaresMod21) // Alonso del Arte, Nov 21 2019
CROSSREFS
Cf. A010383.
Sequence in context: A050578 A283513 A028776 * A028755 A187897 A187319
KEYWORD
nonn,fini,full,easy
STATUS
approved