OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 except for n = 1, 2, 3, 4, 6, 10, 18. In other words, for any prime p > 7 not equal to 13 or 29 or 61, there are three consecutive integers which are primitive roots modulo p.
Let p be an odd prime. For any integer c, define S(c,p) to be the sum of the Legendre symbols ((g+c)/p) over all primitive roots g modulo p among 1, ..., p-1. If g is a primitive root modulo p, then so is the inverse g^{-1} of g modulo p, and -((g^{-1}+c)/p) = (g*(g^{-1}+c)/p) = ((1+c*g)/p). So S(1,p) = 0, and also S(-1,p) = 0 when p == 1 (mod 4). The author also showed that S(-c,p) = S(c,p) if p == 1 (mod 4), and that S(c,p) = 0 if p is a Fermat prime and c is a quadratic residue modulo p.
Zhi-Wei Sun also made the following conjectures:
(i) Let p > 13 be a prime not equal to 19 or 31, and let a,b,c be integers with a or c not divisible by p. If p does not divide b^2-4*a*c, then there is a primitive root g modulo p such that a*g^2+b*g+c is a quadratic residue modulo p, and there is also a primitive root h modulo p such that a*h^2+b*h+c is a quadratic nonresidue modulo p.
(ii) Let p be any odd prime, and let a,b,c be integers with a or c not divisible by p. If p does not divide b^2-4*a*c, then the absolute value of the sum of the Legendre symbols ((a*g^2+b*g+c)/p) over all primitive roots g modulo p among 1, ..., p-1 is smaller than 2*sqrt(p).
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..400
EXAMPLE
a(5) = 1 since 6, 7, 8 are primitive roots modulo p_5 = 11.
a(7) = 2 since 5, 6, 7, 10, 11, 12 are primitive roots modulo p_7 = 17.
a(8) = 1 since 13, 14, 15 are primitive roots modulo p_8 = 19.
MATHEMATICA
gp[g_, p_]:=gp[g, p]=Length[Union[Table[Mod[g^k, p], {k, 1, p-1}]]]==p-1
a[n_]:=Sum[If[gp[g, Prime[n]]&&gp[g-1, Prime[n]]&&gp[g+1, Prime[n]], 1, 0], {g, 1, Prime[n]-1}]
Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Oct 02 2013
STATUS
approved