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”).

a(n) is 1 if A196202(n) is a local maximum, -1 if A196202(n) is a local minimum and 0 otherwise.
0

%I #4 Nov 30 2020 09:00:54

%S 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,

%T 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,

%U -1,0,1,0,-1,1,-1,0,0,1,0,-1,1,0,-1,1,-1,1,0

%N a(n) is 1 if A196202(n) is a local maximum, -1 if A196202(n) is a local minimum and 0 otherwise.

%C 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.

%C How are the terms with value -1 distributed within this sequence?

%C Is there a correlation between the distribution of Wieferich primes within A000040 and the distribution of the -1 terms within this sequence?

%e 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.

%o (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)))

%Y Cf. A001220, A196202.

%K sign,easy

%O 2

%A _Felix Fröhlich_, Nov 25 2020