login
a(n) = smallest prime q where exactly n primes p exist such that p < q and q^(p-1) == 1 (mod p^2), i.e., smallest prime base q having exactly n Wieferich primes less than q.
3

%I #20 Mar 13 2015 15:19:21

%S 5,17,19,233,293,977,1451,1693,33301,308093

%N a(n) = smallest prime q where exactly n primes p exist such that p < q and q^(p-1) == 1 (mod p^2), i.e., smallest prime base q having exactly n Wieferich primes less than q.

%C From _Robert G. Wilson v_, Mar 11 2015: (Start)

%C n b p

%C 1: 5 {2}

%C 2: 17 {2, 3}

%C 3: 19 {3, 7, 13}

%C 4: 233 {2, 3, 11, 157}

%C 5: 293 {2, 5, 7, 19, 83}

%C 6: 977 {2, 11, 17, 109, 239, 401}

%C 7: 1451 {5, 7, 11, 13, 83, 173, 1259}

%C 8: 1693 {2, 3, 5, 11, 31, 37, 61, 109}

%C 9: 33301 {2, 3, 5, 7, 43, 293, 317, 383, 1627}

%C 10: 308093 {2, 5, 7, 11, 31, 47, 89, 167, 523, 619}

%C ... (End)

%e a(5) = 293, because q = 293 is the smallest prime for which there are exactly five primes p with p < q such that q^(p-1) == 1 (mod p^2), namely 2, 5, 7, 19 and 83.

%o (PARI) for(n=1, 10, q=2; while(q > 1, q=nextprime(q+1); i=0; forprime(p=2, q, if(Mod(q, p^2)^(p-1)==1, i++); if(i==n, print1(q, ", "); break({2})))))

%Y Cf. A175932, A222206.

%Y For the values of p, see A252582.

%K nonn,hard,more

%O 1,1

%A _Felix Fröhlich_, Dec 15 2014