OFFSET
2
COMMENTS
Clearly, if p = prime(n) is a Wieferich prime (A001220) that is preceded and followed by non-Wieferich primes, then a(n) = -1. Heuristic arguments predict this is the case for all Wieferich primes.
How are the terms with value -1 distributed within this sequence?
Is there a correlation between the distribution of Wieferich primes within A000040 and the distribution of the -1 terms within this sequence?
EXAMPLE
For n = 4: The values of A196202(i) for i = 3, 4, 5, respectively, are 16, 15, 56 and 16 > 15 < 56, meaning 15 is a local minimum and therefore a(4) = -1.
PROG
(PARI) a(n) = my(p=prime(n), v=[precprime(p-1), p, nextprime(p+1)]); v=[lift(Mod(2, v[1]^2)^(v[1]-1)), lift(Mod(2, v[2]^2)^(v[2]-1)), lift(Mod(2, v[3]^2)^(v[3]-1))]; if(v[2] > v[1] && v[2] > v[3], return(1), if(v[2] < v[1] && v[2] < v[3], return(-1), return(0)))
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Felix Fröhlich, Nov 25 2020
STATUS
approved