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!)
A001918 Least positive primitive root of n-th prime.
(Formerly M0242 N0083)
96

%I M0242 N0083 #76 Sep 14 2022 02:06:09

%S 1,2,2,3,2,2,3,2,5,2,3,2,6,3,5,2,2,2,2,7,5,3,2,3,5,2,5,2,6,3,3,2,3,2,

%T 2,6,5,2,5,2,2,2,19,5,2,3,2,3,2,6,3,7,7,6,3,5,2,6,5,3,3,2,5,17,10,2,3,

%U 10,2,2,3,7,6,2,2,5,2,5,3,21,2,2,7,5,15,2,3,13,2,3,2,13,3,2,7,5,2,3,2,2,2,2,2,3

%N Least positive primitive root of n-th prime.

%C If k is a primitive root of p=4m+1, then p-k is too. If k is a primitive root of p=4m+3, then p-k isn't, but has order 2m+1. - _Jon Perry_, Sep 07 2014

%D M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 864.

%D T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 213.

%D CRC Handbook of Combinatorial Designs, 1996, p. 615.

%D P. Fan and M. Darnell, Sequence Design for Communications Applications, Wiley, NY, 1996, Table A.1.

%D G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 111

%D Hua Loo Keng, Introduction To Number Theory, 'Table of least primitive roots for primes less than 50000', pp. 52-6, Springer NY 1982.

%D R. Osborn, Tables of All Primitive Roots of Odd Primes Less Than 1000, Univ. Texas Press, 1961.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H N. J. A. Sloane, <a href="/A001918/b001918.txt">Table of n, a(n) for n = 1..10000</a>

%H M. Abramowitz and I. A. Stegun, eds., <a href="http://www.convertit.com/Go/ConvertIt/Reference/AMS55.ASP">Handbook of Mathematical Functions</a>, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].

%H Loo-keng Hua, <a href="http://dx.doi.org/10.1090/S0002-9904-1942-07767-6">On the least primitive root of a prime</a>, Bull. Amer. Math. Soc. 48 (1942), 726-730.

%H K. Matthews, <a href="http://www.numbertheory.org/php/lprimroot.html">Finding the least primitive root (mod p), p an odd prime</a>

%H T. Oliveira e Silva, <a href="http://sweet.ua.pt/tos/p_roots.html">Least primitive root of prime numbers</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimitiveRoot.html">Primitive Root</a>.

%e modulo 7: 3^6=1, 3^2=2, 3^7=3, 3^4=4, 3^5=5, 3^3=6, 7=prime(4), 3=a(4).

%p A001918 := proc(n)

%p numtheory[primroot](ithprime(n)) ;

%p end proc:

%t Table[PrimitiveRoot@Prime@n, {n, 101}] (* _Robert G. Wilson v_, Dec 15 2005 *)

%t PrimitiveRoot[Prime[Range[110]]] (* _Harvey P. Dale_, Jan 13 2013 *)

%o (PARI) for(x=1, 1000, print1(lift(znprimroot(prime(x))), ", "))

%o (Sage) [primitive_root(p) for p in primes(570)] # _Zerinvary Lajos_, May 24 2009

%o (Python)

%o from sympy import prime

%o from sympy.ntheory.residue_ntheory import primitive_root

%o def A001918(n): return primitive_root(prime(n)) # _Chai Wah Wu_, Sep 13 2022

%Y A column of A060749. Cf. A002233.

%K nonn,nice,easy

%O 1,2

%A _N. J. A. Sloane_

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)