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!)
A219429 Highest prime primitive root (less than p) for the n-th prime p. (or 0 if none exists). 1
0, 2, 3, 5, 7, 11, 11, 13, 19, 19, 17, 19, 29, 29, 43, 41, 47, 59, 61, 67, 59, 59, 79, 83, 83, 89, 101, 103, 103, 107, 109, 127, 131, 109, 139, 109, 151, 149, 163, 131, 167, 179, 181, 167, 179, 197, 191, 173, 223, 223, 227, 227, 227, 239, 251, 257, 257 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

MAPLE

f:=proc(n) local p, k;

   p:= ithprime(n);

   for k from p-1 to 1 by -1 do

     if numtheory:-order(k, p) = p-1 and isprime(k) then return k fi

   od;

0

end proc;

map(f, [$1..100]); # Robert Israel, Apr 11 2021

MATHEMATICA

Reap[For[p = 2, p<1000, p = NextPrime[p], s = Select[PrimitiveRootList[p], PrimeQ]; Sow[If[s == {}, 0, Last[s]]]]][[2, 1]] (* Jean-Fran├žois Alcover, Sep 03 2016 *)

PROG

(PARI) forprime(i=2, 600, p=0; for(q=1, i-1, if(znorder(Mod(q, i))==eulerphi(i)&&isprime(q), p=q)); print1(p", "))

CROSSREFS

Cf. A002233 (lowest prime primitive root for the n-th prime).

Cf. A001918 (lowest primitive root for the n-th prime).

Cf. A071894 (highest primitive root (less than p) for the n-th prime p).

Sequence in context: A141792 A180458 A060264 * A256457 A104192 A290639

Adjacent sequences:  A219426 A219427 A219428 * A219430 A219431 A219432

KEYWORD

nonn

AUTHOR

V. Raman, Nov 19 2012

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 May 17 11:21 EDT 2022. Contains 353745 sequences. (Running on oeis4.)