login
Numbers n such that x^2 = 1 has more than two solutions in the Gaussian integers modulo n.
2

%I #10 Feb 24 2023 03:11:13

%S 4,5,6,8,10,12,13,14,15,16,17,18,20,21,22,24,25,26,28,29,30,32,33,34,

%T 35,36,37,38,39,40,41,42,44,45,46,48,50,51,52,53,54,55,56,57,58,60,61,

%U 62,63,64,65,66,68,69,70,72,73,74,75,76,77,78,80,82,84,85

%N Numbers n such that x^2 = 1 has more than two solutions in the Gaussian integers modulo n.

%e 13 is in the sequence because 5i, 8i, 1 and 12 are solutions of x^2 = 1 (mod 13).

%t h[n_] := Flatten[Table[a + b I, {a, 0, n - 1}, {b, 0, n - 1}]]; sol[n_] := Select[h[n], Mod[#^2, n] == 1 &]; Select[Range[100], Length[sol[#]] > 2 &]

%K nonn

%O 1,1

%A _José María Grau Ribas_, Jun 16 2013