login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266987 Primes p for which the average of the primitive roots equals p/2. 4
2, 5, 13, 17, 19, 29, 37, 41, 53, 61, 73, 89, 97, 101, 109, 113, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 307, 313, 317, 337, 349, 353, 373, 389, 397, 401, 409, 421, 433, 449 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

From Robert Israel, Feb 01 2016: (Start)

Union of A002144 and A267010.

Contains A002144 because for each of these primes, x is a primitive root iff p-x is a primitive root. (End)

LINKS

Robert Israel, Table of n, a(n) for n = 1..8213

FORMULA

a(n) = prime(A266986(n)).

EXAMPLE

a(13) = 13 since the primitive roots of 13 are 2, 6, 7, and 11 and the average of these primitive roots is (2+6+7+11)/phi(12) = 26/4 = 13/2.

MAPLE

proots := proc(n)

    local r, eulphi, m;

    if n = 1 then

        return {0} ;

    end if;

    eulphi := numtheory[phi](n) ;

    r := {} ;

    for m from 0 to n-1 do

        if numtheory[order](m, n) = eulphi then

            r := r union {m} ;

        end if;

    end do:

    return r;

end proc:

isA266987 := proc(n)

    local r;

    if isprime(n) then

        r := convert(proots(n), list) ;

        2*add(pr, pr=r)  = n*nops(r) ;

    else

        false;

    end if;

end proc:

for n from 1 to 500 do

    if isA266987(n) then

        printf("%d, ", n);

    end if;

end do: # R. J. Mathar, Jan 12 2016

Filter:= proc(p) local x, s, js;

  if p mod 4 = 1 then return true fi;

  x:= numtheory:-primroot(p);

  js:= select(t -> igcd(t, p-1)=1, [$1..p-2]);

  s:= add(x&^ j mod p, j=js);

  evalb(s = p/2 * nops(js))

end proc:

select(Filter, [seq(ithprime(i), i=1..1000)]); # Robert Israel, Feb 01 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 &)]]]

(* second program (version >= 10): *)

Select[Prime[Range[100]], Mean[PrimitiveRootList[#]] == #/2&] (* Jean-Fran├žois Alcover, Jan 12 2016 *)

CROSSREFS

Cf. A002144, A008330, A060749, A088144, A266986, A267010.

Sequence in context: A019419 A175256 A139254 * A061303 A173626 A215424

Adjacent sequences:  A266984 A266985 A266986 * A266988 A266989 A266990

KEYWORD

nonn

AUTHOR

Dimitri Papadopoulos, Jan 08 2016

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 17:18 EST 2019. Contains 329879 sequences. (Running on oeis4.)