%I #41 Apr 03 2023 10:36:11
%S 2,20771,40487,53471161,1645333507,6692367337,188748146801
%N Primes p such that p^2 divides 5^(p-1) - 1.
%C Dorais and Klyve proved that there are no further terms up to 9.7*10^14.
%C a(6) and a(7) were found by Keller and Richstein (cf. Keller, Richstein, 2005). - _Felix Fröhlich_, Jan 06 2017
%C Prime terms of A242959. - _Felix Fröhlich_, Jan 06 2017
%H Amir Akbary and Sahar Siavashi, <a href="http://math.colgate.edu/~integers/s3/s3.Abstract.html">The Largest Known Wieferich Numbers</a>, INTEGERS, 18(2018), A3. See Table 1 p. 5.
%H Chris K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php?sort=FermatQuotient">Fermat quotient</a>.
%H François G. Dorais and Dominic Klyve, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL14/Klyve/klyve3.html">A Wieferich prime search up to p < 6.7*10^15</a>, J. Integer Seq. 14 (2011), Art. 11.9.2, 1-14.
%H W. Keller and J. Richstein, <a href="https://doi.org/10.1090/S0025-5718-04-01666-7">Solutions of the congruence a^p-1 == 1 (mod p^r)</a>, Math. Comp. 74 (2005), 927-936.
%H A. Paszkiewicz, <a href="http://dx.doi.org/10.1090/S0025-5718-08-02090-5">A new prime p for which the least primitive root (mod p) and the least primitive root (mod p^2) are not equal</a>, Math. Comp. 78 (2009), 1193-1195.
%t Select[Prime[Range[2500]], Divisible[5^(# - 1) - 1, #^2] &] (* _Alonso del Arte_, Aug 01 2014 *)
%t Select[Prime[Range[55*10^6]],PowerMod[5,#-1,#^2]==1&] (* The program generates the first 4 terms of the sequence. *) (* _Harvey P. Dale_, Jan 29 2023 *)
%o (PARI)
%o N=10^9; default(primelimit, N);
%o forprime(n=2, N, if(Mod(5, n^2)^(n-1)==1, print1(n, ", ")));
%o \\ _Joerg Arndt_, May 01 2013
%Y Cf. A001220, A014127, A123693, A128667, A128668, A090968, A128669, A096082, A242959.
%K hard,nonn,more
%O 1,1
%A _Max Alekseyev_, Oct 07 2006
%E More terms from _Alexander Adamchuk_, Nov 27 2006
%E Updated by _Max Alekseyev_, Jan 29 2012