OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 for all n > 1. In other words, for any odd prime p, there is a prime q < p such that both q and 2^q - q are primitive roots modulo p.
According to page 377 in Guy's book, Erdős asked whether for any sufficiently large prime p there exists a prime q < p which is a primitive root modulo p.
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, New York, 2004.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..3500
Zhi-Wei Sun, Notes on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.
EXAMPLE
a(4) = 1 since 3 is a prime smaller than prime(4) = 7, and both 3 and 2^3 - 3 = 5 are primitive roots modulo 7.
a(10) = 1 since 2 is a prime smaller than prime(10) = 29, and 2 and 2^2 - 2 are primitive roots modulo 29.
a(36) = 1 since 71 is a prime smaller than prime(36) = 151, and both 71 and 2^(71) - 71 ( == 14 (mod 151)) are primitive roots modulo 151.
MATHEMATICA
f[k_]:=2^(Prime[k])-Prime[k]
dv[n_]:=Divisors[n]
Do[m=0; Do[If[Mod[f[k], Prime[n]]==0, Goto[aa], Do[If[Mod[(Prime[k])^(Part[dv[Prime[n]-1], i]), Prime[n]]==1||Mod[f[k]^(Part[dv[Prime[n]-1], i]), Prime[n]]==1, Goto[aa]], {i, 1, Length[dv[Prime[n]-1]]-1}]]; m=m+1; Label[aa]; Continue, {k, 1, n-1}];
Print[n, " ", m]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 11 2014
STATUS
approved