|
|
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
|
|
|
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
|
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|