A247072 Smallest Wieferich prime (> sqrt(n)) in base n.
2, 1093, 11, 1093, 20771, 66161, 5, 3, 11, 487, 71, 2693, 863, 29, 29131, 1093, 46021, 5, 7, 281
Offset: 1
Examples
a(12) = 2693 because the Wieferich primes to base 12 are 2693, 123653, ..., and 2693 is greater than sqrt(12), so a(12) = 2693. a(17) = 46021 because the Wieferich primes to base 17 are 2, 3, 46021, 48947, 478225523351, ..., but neither 2 nor 3 is greater than sqrt(17), so a(17) = 46021.
Links
- Eric Chen, Table of known a(n) up to a(1000)
- Richard Fischer, Fermat quotients B^(P-1) == 1 (mod P^2)
- Wikipedia, Wieferich prime
Crossrefs
Programs
-
Mathematica
a247072[n_] := Block[{p = Int[Sqrt[n]]+1}, While[!PrimeQ[p] || [p < 10^8 && PowerMod[n, p - 1, p^2] != 1], p++]; If[p == 10^8, 0, p]]; Table[ a247072[n], {n, 100}] (* Eric Chen, Nov 27 2014 *)
-
PARI
a(n)=forprime(p=sqrtint(n)+1,,if(Mod(n^(p-1),p^2)==1,return(p))) n=1; while(n<101, print1(a(n), ", "); n++) \\ Charles R Greathouse IV, Nov 16 2014
Comments