OFFSET
1,1
COMMENTS
Most primes for which the average of the primitive roots=p/2 are of the form p==1(mod 4). Much rarer for primes of form p==3(mod 4) to have this property. (Observation)
EXAMPLE
19 is a term because the primitive roots of 19 are 2, 3, 10, 13, 14, and 15. Their average is (2+3+10+13+14+15)/phi(18)=57/phi(18)=57/6=19/2.
MAPLE
isA267010 := proc(n)
if isprime(n) and modp(n, 4) = 3 then
isA266987(n) ;
else
false;
end if;
end proc: # R. J. Mathar, Aug 14 2024
MATHEMATICA
f[n_] := If[Total[Flatten[Position[Table[MultiplicativeOrder[i, Prime[n]], {i, Prime[n] - 1}], Prime[n] - 1]]] == EulerPhi[Prime[n] - 1]*Prime[n]/2, 1, 0];
For[k = 1, k < 10000, k++, If[f[k] == 1 && Mod[Prime[k], 4] == 3, Print[k, " ", Prime[k]]]]
Select[4*Range[1000] + 3, PrimeQ[#] && Mean[PrimitiveRootList[#]] == #/2 &] (* Amiram Eldar, Oct 11 2021 *)
PROG
(PARI) vr(p) = j=0; r=vector(eulerphi(p-1)); pr=znprimroot(p); for(i=1, p-1, if(gcd(i, p-1)==1, r[j++]=lift(pr^i))); r; \\ after A060749
isok(p) = ((p % 4 == 3) && (vpr = vr(p)) && (vecsum(vpr) == #vpr*p/2)); \\ Michel Marcus, Jan 09 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Dimitri Papadopoulos, Jan 08 2016
EXTENSIONS
a(16)-a(38) from Michel Marcus, Jan 09 2016
STATUS
approved