login
Numbers n such that a^(n-1) == 1 (mod n^2) has solutions with 1 < a < n^2-1.
3

%I #10 Apr 24 2019 10:41:28

%S 5,7,11,13,15,17,19,21,23,25,28,29,31,33,35,37,39,41,43,45,47,49,51,

%T 52,53,55,57,59,61,63,65,66,67,69,70,71,73,75,76,77,79,83,85,87,89,91,

%U 93,95,97,99,101,103,105,107,109,111,112,113,115,117,119,121,123,124,125

%N Numbers n such that a^(n-1) == 1 (mod n^2) has solutions with 1 < a < n^2-1.

%C Numbers n such that A185103(n) < n^2 + (-1)^n.

%C Complement of A280196.

%C Even terms are A039772.

%C Odd terms are all odd numbers that are not powers of 3.

%C Conjecture: composite terms are A181780.

%H Robert Israel, <a href="/A280199/b280199.txt">Table of n, a(n) for n = 1..17948</a>

%e a(4) = 13 is in the sequence because 19^12 == 1 (mod 13^2), and 1 < 19 < 13^2-1.

%p Aeven:= remove(t -> igcd(t-1, numtheory:-phi(t^2))=1, {seq(i,i=2..1000,2)}):

%p Aodd:= {seq(i,i=3..1000,2)} minus {seq(3^i,i=0..floor(log[3](1000)))}:

%p sort(convert(Aeven union Aodd,list));

%t Aeven = DeleteCases[Range[2, 1000, 2], t_ /; GCD[t-1, EulerPhi[t^2]] == 1];

%t Aodd = Complement[Range[3, 1000, 2], Table[3^i, {i, 0, Floor[Log[3, 1000]]} ]];

%t Union[Aeven, Aodd] (* _Jean-François Alcover_, Apr 24 2019, after _Robert Israel_ *)

%Y Cf. A000244, A039772, A185103, A280196.

%K nonn

%O 1,1

%A _Robert Israel_ and _Thomas Ordowski_, Dec 28 2016