OFFSET
1,5
COMMENTS
Conjecture: a(n) > 0 for all n > 6. In other words, for any prime p > 13, there are three distinct elements a,b,c of {1,...,p-1} with a+b = c such that a,b,c and a*b*c are all primitive roots modulo p.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 8 since 2 + 6 = 8, and the four numbers 2, 6, 8 and 2*6*8=96 are all primitive roots modulo prime(5) = 11.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
Dv[n_]:=Divisors[Prime[n]-1]
Do[Do[Do[If[Mod[k^(Part[Dv[n], t]), Prime[n]]==1, Goto[bb]], {t, 1, Length[Dv[n]]-1}]; Do[Do[If[Mod[j^(Part[Dv[n], t]), Prime[n]]==1||Mod[(k-j)^(Part[Dv[n], t]), Prime[n]]==1||Mod[((k-j)j*k)^(Part[Dv[n], t]), Prime[n]]==1, Goto[cc]]; Continue, {t, 1, Length[Dv[n]]-1}]; Print[n, " ", k]; Goto[aa]; Label[cc]; Continue, {j, 1, (k-1)/2}]; Label[bb]; Continue, {k, 1, Prime[n]-1}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 60}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 05 2015
STATUS
approved