login
Nonsquares mod 100.
1

%I #50 Dec 26 2019 04:45:48

%S 2,3,5,6,7,8,10,11,12,13,14,15,17,18,19,20,22,23,26,27,28,30,31,32,33,

%T 34,35,37,38,39,40,42,43,45,46,47,48,50,51,52,53,54,55,57,58,59,60,62,

%U 63,65,66,67,68,70,71,72,73,74,75,77,78,79,80,82,83,85,86,87,88,90,91,92,93,94,95,97,98,99

%N Nonsquares mod 100.

%C Complement of A010461. Numbers n such that k^2 == n (mod 100) has no solution. - _Altug Alkan_, Dec 10 2015

%t n = 100; Complement[Range[0, n - 1], Union@ Array[PowerMod[#, 2, n] &, {100}]] (* _Michael De Vlieger_, Dec 10 2015 *)

%o (PARI) v=vector(100,n,n^2%100); v=vecsort(v); for(i=1, 99, if (!vecsearch(v,i), print1(i,", "))) \\ _Derek Orr_, Sep 25 2014

%o (PARI) for (n=0, 99, if (!issquare(Mod(n, 100)), print1(n, ", "));); \\ _Michel Marcus_, Dec 10 2015

%o (Scala) (0 to 99).diff((1 to 100).map(n => (n * n) % 100)) // _Alonso del Arte_, Dec 25 2019

%Y Cf. A000037 (nonsquares).

%Y Cf. A010461.

%K nonn,fini,full,easy

%O 1,1

%A _N. J. A. Sloane_

%E More terms to show full sequence from _Derek Orr_, Sep 25 2014