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!)
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 * A369029 A007967 A054494
KEYWORD
easy,sign
AUTHOR
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)