OFFSET
1,2
COMMENTS
The corresponding primes are in A023048.
For n < 150, only a(108) is presently unknown. - Robert G. Wilson v, Jan 03 2006
LINKS
Tomás Oliveira e Silva, Least prime primitive root of prime numbers
E. Weisstein, Primitive Roots
FORMULA
a(n) = 0 iff n is a perfect power (A001597) > 1. - Robert G. Wilson v, Jan 03 2006
a(n) = min { k | A001918(k) = n } U {0} = A000720(A023048(n)) (or zero). - M. F. Hasler, Jun 01 2018
EXAMPLE
a(6) = 13 because Prime[13] = 41 is the least prime with least primitive root = 6
MATHEMATICA
big = Table[ p = Prime[ n ]; PrimitiveRoot[ p ], {n, 1, 1000000} ]; Flatten[ Table[ Position[ big, n, 1, 1 ]/.{}-> 0, {n, 79} ] ] (* First load package NumberTheory`NumberTheoryFunctions` *)
(* first load package *) << NumberTheory`NumberTheoryFunctions` (* then do *) t = Table[0, {100}]; Do[a = PrimitiveRoot@Prime@n; If[a < 101 && t[[a]] == 0, t[[a]] = n], {n, 10^6}]; t (* Robert G. Wilson v, Dec 15 2005 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Wouter Meeussen, Jan 06 2002
EXTENSIONS
Edited by Dean Hickerson, Jan 14 2002
Further terms from Robert G. Wilson v, Jan 03 2006
STATUS
approved