

A242222


Number of primes p <= (prime(n)+1)/2 such that the harmonic number H(p1) = 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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(q1) = sum_{0<k<q}1/k is a primitive root modulo p.


LINKS

ZhiWei Sun, Table of n, a(n) for n = 1..700
ZhiWei 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(71) = 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(51) = 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(111) = 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

Cf. A000040, A001008, A002805, A242210, A242213, A242223.
Sequence in context: A132409 A030337 A136406 * A247198 A305319 A026568
Adjacent sequences: A242219 A242220 A242221 * A242223 A242224 A242225


KEYWORD

nonn


AUTHOR

ZhiWei Sun, May 08 2014


STATUS

approved



