OFFSET
1,3
COMMENTS
If there is a tie (i.e., both +k and -k are primitive roots with the least absolute value), then a(n) = +k. - Robert Israel, May 29 2026
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) local p, t, k;
p:= ithprime(n);
t:= NumberTheory:-PrimitiveRoot(p);
for k from 1 to t-1 do if NumberTheory:-MultiplicativeOrder(p-k, p) = p-1 then return -k fi od:
t
end proc:
map(f, [$1..100]); # Robert Israel, May 29 2026
CROSSREFS
KEYWORD
sign
AUTHOR
Calculated by Jud McCranie
STATUS
approved
