login
A243847
a(n) = |{0 < k < n: prime(k) is a primitive root modulo prime(n) and also a primitive root modulo prime(2*n)}|.
1
0, 0, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 3, 1, 5, 2, 1, 1, 3, 5, 2, 3, 2, 3, 5, 4, 4, 7, 1, 5, 5, 7, 7, 6, 8, 6, 6, 5, 6, 3, 5, 4, 8, 6, 4, 5, 6, 6, 12, 8, 15, 17, 7, 10, 8, 11, 10, 8, 9, 10, 7, 18, 6, 15, 4, 9, 5, 10, 10, 8
OFFSET
1,7
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 2.
(ii) For any integer n > 4, there is a primitive root 0 < g < prime(n) modulo prime(n) which is also a primitive root modulo prime(n+1).
LINKS
Zhi-Wei Sun, New observations on primitive roots modulo primes, arXiv:1405.0290 [math.NT], 2014.
EXAMPLE
a(3) = 1 since prime(1) = 2 is a primitive root modulo prime(3) = 5 and also a primitive root modulo prime(2*3) = 13. Note that prime(2) = 3 is not a primitive root modulo prime(2*3) = 13 since 3^3 == 1 (mod 13).
MATHEMATICA
dv[n_]:=Divisors[n]
Do[m=0; Do[Do[If[Mod[(Prime[k])^(Part[dv[Prime[n]-1], i]), Prime[n]]==1, Goto[aa]], {i, 1, Length[dv[Prime[n]-1]]-1}]; Do[If[Mod[(Prime[k])^(Part[dv[Prime[2n]-1], j]), Prime[2n]]==1, Goto[aa]], {j, 1, Length[dv[Prime[2n]-1]]-1}]; m=m+1; Label[aa]; Continue, {k, 1, n-1}]; Print[n, " ", m]; Continue, {n, 1, 70}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jun 12 2014
STATUS
approved