login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266989 Primes for which the average of the primitive roots is < p/2. 2
31, 43, 67, 223, 379, 491, 619, 631, 643, 683, 859, 883, 907, 1051, 1091, 1423, 1747, 1987, 2143, 2347, 2371, 2467, 2531, 2767, 3307, 3643, 3691, 3739, 3823, 3931, 4019, 4219, 4519, 4691, 4987, 5059, 5107, 5347, 5683, 5827, 6043 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
These primes are congruent to 3 (mod 4).
LINKS
FORMULA
a(n) = prime(A266988(n)).
EXAMPLE
a(1)=31. The primitive roots of 31 are 3, 11, 12, 13, 17, 21, 22, and 24.
Their average is (3+11+12+13+17+21+22+24)/phi(30)=123/8<31/2.
MAPLE
f:= proc(p) local g;
if not isprime(p) then return false fi;
g:= numtheory[primroot](p);
evalb(add(g&^i mod p, i = select(t->igcd(t, p-1)=1, [$1..p-2]))
< p/2 * numtheory:-phi(p-1))
end proc:
select(f, [seq(i, i=3..10000, 4)]); # Robert Israel, Feb 09 2016
MATHEMATICA
A = Table[Total[Flatten[Position[Table[MultiplicativeOrder[i, Prime[k]], {i, Prime[k] - 1}], Prime[k] - 1]]]/(EulerPhi[Prime[k] - 1] Prime[k]/2), {k, 1, 100}]; Prime[Flatten[Position[A, _?(# < 1 &)]]]
PROG
(PARI) ar(p) = my(r, pr, j); r=vector(eulerphi(p-1)); pr=znprimroot(p); for(i=1, p-1, if(gcd(i, p-1)==1, r[j++]=lift(pr^i))); vecsort(r) ;
isok(p) = my(vr = ar(p)); vecsum(vr)/#vr < p/2;
lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", "))); \\ Michel Marcus, Feb 09 2016
CROSSREFS
Sequence in context: A060834 A060844 A112789 * A161615 A307950 A342974
KEYWORD
nonn
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 14 00:20 EDT 2024. Contains 371652 sequences. (Running on oeis4.)