login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A028753
Nonsquares mod 40.
1
2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39
OFFSET
1,1
MATHEMATICA
Complement[Range[0, 39], PowerMod[Range[40], 2, 40]] (* Alonso del Arte, Feb 20 2020 *)
PROG
(Scala) (0 to 39).diff((1 to 40).map(n => n * n % 40)) // Alonso del Arte, Feb 20 2020
(Magma) [n: n in [0..39] | not IsSquare(R! n) where R:= ResidueClassRing(40)]; // Vincenzo Librandi, Feb 21 2020
CROSSREFS
Cf. A010401.
Sequence in context: A028813 A158276 A028793 * A336918 A028745 A028777
KEYWORD
nonn,fini,full,easy
AUTHOR
STATUS
approved