OFFSET
1,3
MATHEMATICA
Union[PowerMod[Range[40], 2, 40]] (* Vincenzo Librandi, Dec 27 2019 *)
PROG
(Sage) [quadratic_residues(40)] # Zerinvary Lajos, May 24 2009
(Scala) (1 to 40).map(n => n * n % 40).toSet.toSeq.sorted // Alonso del Arte, Feb 20 2020
CROSSREFS
KEYWORD
nonn,fini,full,easy
AUTHOR
STATUS
approved