OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 for all n > 3. In other words, for any prime p > 5, there exists a prime q <= (p+1)/2 such that the harmonic number H(q-1) = sum_{0<k<q}1/k is a primitive root modulo p.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..700
Zhi-Wei Sun, Notes on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.
EXAMPLE
a(6) = 1 since 7 is a prime not exceeding (prime(6)+1)/2 = 7, and H(7-1) = 49/20 == -6 (mod 13) with -6 a primitive root modulo prime(6) = 13.
a(8) = 1 since 5 is a prime not exceeding (prime(8)+1)/2 = 10, and H(5-1) = 25/12 == -9 (mod 19) with -9 a primitive root modulo prime(8) = 19.
a(9) = 1 since 11 is a prime not exceeding (prime(9)+1)/2 = 12, and H(11-1) = 7381/2520 == -9 (mod 23) with -9 a primitive root modulo prime(9) = 23.
MATHEMATICA
rMod[m_, n_]:=Mod[Numerator[m]*PowerMod[Denominator[m], -1, n], n, -n/2]
f[k_]:=HarmonicNumber[Prime[k]-1]
dv[n_]:=Divisors[n]
Do[m=0; Do[If[rMod[f[k], Prime[n]]==0, Goto[aa]]; Do[If[rMod[f[k]^(Part[dv[Prime[n]-1], i])-1, Prime[n]]==0, Goto[aa]], {i, 1, Length[dv[Prime[n]-1]]-1}]; m=m+1; Label[aa]; Continue, {k, 1, PrimePi[(Prime[n]+1)/2]}]; Print[n, " ", m]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 08 2014
STATUS
approved