%I M5132 N2224 #36 Feb 13 2023 09:52:17
%S 23,47,73,97,103,157,167,193,263,277,307,383,397,433,503,577,647,673,
%T 683,727,743,863,887,937,967,983,1033,1093,1103,1153,1163,1223,1367,
%U 1487,1543,1583,1607,1777,1823,1847,1933,1993,2003,2017,2063,2087,2113,2203,2207
%N Primes with 5 as smallest primitive root.
%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 M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 57.
%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 T. D. Noe, <a href="/A001124/b001124.txt">Table of n, a(n) for n = 1..1000</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 <a href="/index/Pri#primes_root">Index entries for primes by primitive root</a>
%t << NumberTheory`NumberTheoryFunctions`; Prime[ Select[ Range[200], PrimitiveRoot[ Prime[ # ] ] == 5 & ] ]
%t (* first load *) << NumberTheory`NumberTheoryFunctions` (* then *) Select[ Prime@Range@300, PrimitiveRoot@# == 5 &] (* _Robert G. Wilson v_, May 11 2001 *)
%t Select[Prime[Range[350]],PrimitiveRoot[#]==5&] (* The PrimitiveRoot function is now part of Mathematica's core, so no add-in needs to be loaded before calling it *) (* _Harvey P. Dale_, Dec 06 2014 *)
%o (Python)
%o from itertools import islice
%o from sympy import nextprime, primitive_root
%o def A001124_gen(): # generator of terms
%o p = 5
%o while (p:=nextprime(p)):
%o if primitive_root(p)==5:
%o yield p
%o A001124_list = list(islice(A001124_gen(),30)) # _Chai Wah Wu_, Feb 13 2023
%Y Cf. A001122, A001123, A001125, etc.
%K nonn
%O 1,1
%A _N. J. A. Sloane_
%E More terms from _Robert G. Wilson v_, May 10 2001