OFFSET
1,1
COMMENTS
If p is an odd prime and 2^(2^p-2) == 1 (mod p), then 2^(2^p-2) == 1 (mod p^2).
If 2^(k-1) == 1 (mod k) and 2^(2^k-2) == 1 (mod k), then 2^(2^k-2) == 1 (mod k^2).
Composite terms that are not Fermat pseudoprimes to base 2 are 66709, 951481, ...
Note that 66709 = 19*3511 and 951481 = 271*3511, where 3511 is a Wieferich prime.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..250 from Michel Marcus)
EXAMPLE
3 is a term, because 3^2 divides 2^(2^3-2) - 1 = 2^6 - 1 = 63.
MATHEMATICA
Select[Range[12500], PowerMod[2, 2^# - 2, #^2] == 1 &] (* Amiram Eldar, Jul 22 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Ordowski, Jul 22 2024
EXTENSIONS
More terms from Amiram Eldar Jul 22 2024
STATUS
approved