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!)
A172480 Odd primes p such that there are as many primitive roots (mod p) in the interval [0,p/2] as in the interval [p/2,p]. 3
5, 7, 13, 17, 29, 31, 37, 41, 43, 53, 61, 67, 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, 367, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 487, 509, 521, 541, 557, 569 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The sequence contains all the primes of the form 4m+1 (A002144).

The sequence also contains some primes of the form 4m+3 (see them in A172490).

LINKS

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

MAPLE

filter:= proc(p) local m; uses NumberTheory;

if not isprime(p) then return false fi;

if p mod 4 = 1 then return true fi;

m:= Totient(Totient(p))/2;

PrimitiveRoot(p, ith=m+1)=PrimitiveRoot(p, greaterthan=floor(p/2))

end proc:

select(filter, [seq(i, i=5..1000, 2)]); # Robert Israel, Nov 23 2019

MATHEMATICA

<< NumberTheory`NumberTheoryFunctions` m = 2; s = {}; While[m < 10000, m++; p = Prime[m]; If[Mod[p, 4] == 1, s = {s, p}, q = (p - 1)/2; g = PrimitiveRoot[p]; se = Select[Range[p - 1], GCD[ #, p - 1] == 1 &]; e = Length[se]; j = 0; t = 0; While[j < e, j++; h = PowerMod[g, se[[j]], p]; If[h <= q, t = t + 1, ] ]; If[e == 2t, s = {s, p}, ] ] ]; s = Flatten[s]

CROSSREFS

A002144 is a subsequence.

Cf. A118818, A172490

Sequence in context: A314323 A314324 A247011 * A285886 A106069 A339691

Adjacent sequences: A172477 A172478 A172479 * A172481 A172482 A172483

KEYWORD

nonn

AUTHOR

Emmanuel Vantieghem, Feb 04 2010

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 February 8 00:42 EST 2023. Contains 360133 sequences. (Running on oeis4.)