%I #35 Sep 29 2024 13:18:29
%S 3,5,13,37,73,109,181,541,1621,4861,9721,19441,58321,87481,379081,
%T 408241,2041201,2449441,7348321,14696641,22044961,95528161,382112641,
%U 2292675841,8024365441,40121827201,481461926401,722192889601,2888771558401,7944121785601,55608852499201,111217704998401,889741639987201,1779483279974401
%N a(n) is the smallest prime p such that 2^(p-1) == 1 (mod a(1)*...*a(n-1)*p).
%C Conjecture: a(n) is the smallest integer k > 1 such that 2^(k-1) == 1 (mod a(0)*...*a(n-1)*k), with a(0) = 1. - _Thomas Ordowski_, Mar 13 2019
%C Either a(n) > a(n-1), or a(n) = a(n-1) is a Wieferich prime (A001220). - _Max Alekseyev_, Sep 29 2024
%H Max Alekseyev, <a href="/A175257/b175257.txt">Table of n, a(n) for n = 1..1000</a>
%t i=1;Do[p=Prime[n];If[Mod[2^(p-1)-1,p*i]==0,Print[p];i=p*i],{n,2,78498}]
%o (PARI) findprime(prd) = {forprime(p=2, , if (Mod(2, p*prd)^(p-1) == 1, return (p)););}
%o lista(nn) = {my(prd = 1, na); for (n=1, nn, na = findprime(prd); print1(na, ", "); prd *= na;);} \\ _Michel Marcus_, Mar 14 2019
%o (PARI) { a175257_first_terms(N=1000) = my(P,L,t); P=[3]; L=2; for(n=#P,N, print(n," ",P[n]); forstep(p=P[n],oo,Mod(1,L), if(p==P[n], if(Mod(2,p^2)^(p-1)==1, error("Wieferich prime!"), next)); if(ispseudoprime(p), P=concat(P,[p]); t=Mod(2,p)^L; fordiv((p-1)\L,d, if(t^d==1, L*=d; break)); break))); P; } \\ _Max Alekseyev_, Sep 29 2024
%Y Cf. A007663, A096060, A002200, A005109, A306826.
%K nonn
%O 1,1
%A _Manuel Valdivia_, Mar 15 2010
%E a(17)-a(26) from _Amiram Eldar_, Feb 03 2019
%E Name corrected by _Thomas Ordowski_, Mar 13 2019
%E a(27) from _Hans Havermann_, Mar 29 2019
%E Eliminated a(0)=1 in the definition (empty products equal 1). - _R. J. Mathar_, Jun 19 2021
%E Terms a(28) onward from _Max Alekseyev_, Sep 29 2024