OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(4) = 4 is in the sequence because a^3 == 1 (mod 4^2) has no solutions except a == 1 (mod 4^2).
a(7) = 9 is in the sequence because a^8 == 1 (mod 9^2) has no solutions except a == 1 (mod 9^2) and a == 80 (mod 9^2), and 80 = 9^2-1.
MAPLE
Aeven:= select(t -> igcd(t-1, numtheory:-phi(t^2))=1, {seq(i, i=2..1000, 2}}):
Aodd:= {seq(3^i, i=0..floor(log[3](1000)))}:
sort(convert(Aeven union Aodd, list));
MATHEMATICA
Aeven = Select[Range[2, 1000, 2], GCD[#-1, EulerPhi[#^2]] == 1&];
Aodd = 3^Range[0, Floor[Log[3, 1000]]];
Union[Aeven, Aodd] (* Jean-François Alcover, Apr 27 2019, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel and Thomas Ordowski, Dec 28 2016
STATUS
approved