login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Nonsquares mod 40.
1

%I #13 Sep 08 2022 08:44:50

%S 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,

%T 33,34,35,37,38,39

%N Nonsquares mod 40.

%t Complement[Range[0, 39], PowerMod[Range[40], 2, 40]] (* _Alonso del Arte_, Feb 20 2020 *)

%o (Scala) (0 to 39).diff((1 to 40).map(n => n * n % 40)) // _Alonso del Arte_, Feb 20 2020

%o (Magma) [n: n in [0..39] | not IsSquare(R! n) where R:= ResidueClassRing(40)]; // _Vincenzo Librandi_, Feb 21 2020

%Y Cf. A010401.

%K nonn,fini,full,easy

%O 1,1

%A _N. J. A. Sloane_.