login
A242222
Number of primes p <= (prime(n)+1)/2 such that the harmonic number H(p-1) = sum_{0<k<p} 1/k is a primitive root modulo prime(n), or 0 if such a prime p does not exist.
3
0, 0, 0, 1, 1, 1, 3, 1, 1, 1, 2, 3, 4, 4, 5, 6, 3, 2, 3, 2, 3, 2, 6, 6, 4, 6, 4, 8, 7, 9, 5, 7, 11, 5, 11, 5, 6, 6, 11, 8, 12, 7, 8, 9, 8, 11, 7, 13, 18, 8, 18, 14, 8, 9, 14, 18, 17, 7, 14, 11, 9, 19, 10, 12, 7, 21, 5, 15, 19, 15
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, 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