OFFSET
0,1
COMMENTS
This sequence is bounded above by 1093, i.e., a(n) <= 1093 for any n, since any Wieferich prime to base 2 is also Wieferich to any base that is a power of two.
Do all primes <= 1093 appear in this sequence?
From Felix Fröhlich, Dec 10 2020: (Start)
The answer is yes. The smallest n such that a(n) = prime(n) is prime(n). The only exceptions are p = 2 and p = 1093 which first occur at n = 0 and n = 1, respectively.
Apparently, a(n) = 1093 if n is a power of 2 when n < 1093 and a(n) = 1093 if n is prime or a power of 2 when n > 1093. (End)
LINKS
Felix Fröhlich, Table of n, a(n) for n = 0..10000
MATHEMATICA
Block[{k}, Table[k = 1; While[PowerMod[2, n (# - 1), #^2] != 1 &@ Prime@ k, k++]; Prime@ k, {n, 0, 70}] ] (* Michael De Vlieger, Dec 10 2020 *)
PROG
(PARI) a(n) = forprime(p=1, , if(Mod(2, p^2)^(n*(p-1))==1, return(p)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Dec 22 2014
STATUS
approved