A174422 1st Wieferich prime base prime(n).
1093, 11, 2, 5, 71, 2, 2, 3, 13, 2, 7, 2, 2, 5
Offset: 1
Examples
a(1) = 1093 is the first Wieferich prime A001220. a(2) = 11 is the first Mirimanoff prime A014127.
Links
- Wikipedia, Generalized Wieferich primes.
- Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (or 0 if unknown)
Crossrefs
Programs
-
Mathematica
f[n_] := Block[{b = Prime@ n, p = 2}, While[ PowerMod[b, p - 1, p^2] != 1, p = NextPrime@ p]; p]; Array[f, 14]
-
PARI
forprime(a=2, 20, forprime(p=2, 10^9, if(Mod(a, p^2)^(p-1)==1, print1(p, ", "); next({2}))); print1("--, ")) \\ Felix Fröhlich, Jun 27 2014
Formula
a(n) = A039951(prime(n)).
a(n) = 2 if and only if prime(n) == 1 (mod 4). [Jonathan Sondow, Aug 29 2010]
Comments