login
A339653
a(n) is 0 if the smallest base-n Wieferich prime is < n, 1 if it is > n and 2 if no base-n Wieferich prime exists.
0
1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
2
COMMENTS
The value of a(47) is unknown since no base-47 Wieferich prime is known (cf. Fischer).
EXAMPLE
For n = 5: The smallest base-5 Wieferich prime is 2 and 2 < 5 so a(5) = 0.
PROG
(PARI) a(n, bound) = forprime(p=1, bound, if(Mod(n, p^2)^(p-1)==1, if(p < n, return(0), return(1)))); ("bound reached")
for(n=2, 50, print1(a(n, 1e8), ", ")) \\ Execute the function like this to search the bases to 10^8
CROSSREFS
Cf. A039951.
Sequence in context: A113431 A116915 A266178 * A255738 A296209 A076141
KEYWORD
nonn,hard,more
AUTHOR
Felix Fröhlich, Dec 12 2020
STATUS
approved