login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339145
a(n) is 1 if A196202(n) is a local maximum, -1 if A196202(n) is a local minimum and 0 otherwise.
0
0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 0, 0, 1, 0, -1, 1, 0, -1, 1, -1, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 1, -1, 1, -1, 1, 0, 0, -1, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 0, 1, 0, -1, 1, 0, -1, 1, -1, 0, 1, 0, -1, 1, -1, 0, 0, 1, 0, -1, 1, 0, -1, 1, -1, 1, 0
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
Sequence in context: A168046 A168184 A013595 * A368912 A368914 A360122
KEYWORD
sign,easy
AUTHOR
Felix Fröhlich, Nov 25 2020
STATUS
approved