The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A174621 a(n) is the smallest generator for the group of numbers relatively prime to n under multiplication mod n; a(n) = -1 if n is not a power of a prime or twice a power of a prime. 1
 1, 2, 3, 2, 5, 3, -1, 2, 3, 2, -1, 2, 3, -1, -1, 3, 5, 2, -1, -1, 7, 5, -1, 2, 7, 2, -1, 2, -1, 3, -1, -1, 3, -1, -1, 2, 3, -1, -1, 6, -1, 3, -1, -1, 5, 5, -1, 3, 3, -1, -1, 2, 5, -1, -1, -1, 3, 2, -1, 2, 3, -1, -1, -1, -1, 2, -1, -1, -1, 7, -1, 5, 5, -1, -1, -1, -1, 3, -1, 2, 7, 2, -1, -1, 3, -1, -1, 3, -1, -1, -1, -1, 5, -1, -1, 5, 3, -1, -1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,2 COMMENTS Same as A046145, except for taking -1 instead of 0. - Joerg Arndt, Jan 16 2015 LINKS MAPLE subs(FAIL=-1, [seq(numtheory:-primroot(n), n=2..1000)]); # Robert Israel, Jan 11 2015 MATHEMATICA lst = {}; f[n_] := PrimitiveRoot[n]; Do[If[IntegerQ@f[n], g = f[n], g = -1]; AppendTo[lst, g], {n, 2, 73}]; Prepend[lst, -1] CROSSREFS Cf. A046145. Sequence in context: A046145 A103309 A248207 * A007967 A054494 A306252 Adjacent sequences:  A174618 A174619 A174620 * A174622 A174623 A174624 KEYWORD easy,sign AUTHOR Vladimir Joseph Stephan Orlovsky, Mar 23 2010 EXTENSIONS Name changed by Arkadiusz Wesolowski, Jul 19 2012 Offset changed and ambiguous term a(0) removed by Arkadiusz Wesolowski, Jul 20 2012 a(1) removed by Joerg Arndt, Jan 11 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 20 16:42 EST 2020. Contains 332080 sequences. (Running on oeis4.)