OFFSET
1,4
COMMENTS
Andrew Granville, based on submitter's analysis of the data in A131685, made the following conjecture: "For some n with 1<=n<=p-1, there does not exist a value of j, with 1 <= j <= 2p, other than j=p-1, for which n^j+j == 0 (mod p)." Max Alekseyev's calculations confirm that the conjecture is true for the primes between 5 and 10^5. The sequence consists of the first such "n" (referred to as "m" in this sequence's definition) for each prime. a(n)=0 means that there is no corresponding m; this occurs at n=1 (p=2), n=2 (p=3), and n=3 (p=5), and at no other primes p<10^5.
PROG
(PARI)
{ a(p) = for(n=1, p-1, local(j=1); while(j<=2*p, if( j!=p-1 && Mod(n, p)^j==-j, break); j++); if(j>2*p, return(n)); ); 0 }
vector(100, n, a(prime(n))) /* Max Alekseyev */
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander R. Povolotsky, Oct 08 2007
EXTENSIONS
Definition simplified and comments edited by Jon E. Schoenfield, Nov 29 2013
STATUS
approved