%I #21 Aug 04 2024 19:12:54
%S 331,359,1549,1777,2011,6211,7481,10369,13477,19069,20431,22567,28289,
%T 32933,39041,40597,77713,96979,101489
%N Primes which are the fourth element of a generalized Wieferich sequence.
%C A generalized Wieferich sequence is an increasing sequence of primes p[1],p[2],... such that a=p[n+1] is a Wieferich prime to base b=p[n], i.e., a^(b-1)=1 (mod b^2).
%H Kevin Acres, Mike Oakes, David Broadhurst, Makoto Kamada, <a href="/A179400/a179400.txt">1993/2011 puzzle</a>, digest of 15 messages in primenumbers Yahoo group, Jan 8 - Jan 9, 2011.
%H D. Broadhurst, <a href="http://groups.yahoo.com/group/primenumbers/message/22386">Re: 1993/2011 puzzle [and Puzzle 7]</a>, in primenumbers@yahoogroups.com, Jan 2011.
%e The smallest generalized Wieferich sequence of length 4 is (3,11,71,331): 3^10=1 (mod 11^2), 11^70=1 (mod 71^2), 71^330=1 (mod 331^2). Therefore, a(1)=331.
%e This can actually be extended with 359 to such a sequence of length 5, since 331^358=1 (mod 359^2). Therefore, the next such sequence is (11,71,331,359) and a(2)=359.
%e Then comes a(3)=1549 from the sequence (307, 487, 1069, 1549). Note that this sequence "starts later" than (197, 653, 1381, 1777) which yields a(4)=1777.
%o (PARI) fp(p)={ my(a=precprime(p)); while(Mod(a,p^2)^(p-1)-1 && a=precprime(a-1),);a }
%o forprime(p=1,default(primelimit),my(a=p); for(c=1,3,(a=fp(a))||next(2));print1(p, ", "))
%Y Cf. A001220, A174422 and references therein.
%K nonn,hard,more
%O 1,1
%A _M. F. Hasler_, Jan 10 2011