login
A033947
Smallest primitive root (in absolute value) of n-th prime.
1
1, -1, 2, -2, 2, 2, 3, 2, -2, 2, 3, 2, 6, 3, -2, 2, 2, 2, 2, -2, 5, -2, 2, 3, 5, 2, -2, 2, 6, 3, 3, 2, 3, 2, 2, -5, 5, 2, -2, 2, 2, 2, -2, 5, 2, -2, 2, 3, 2, 6, 3, -2, 7, -3, 3, -2, 2, -2, 5, 3, 3, 2, 5, -2, 10, 2, 3, 10, 2, 2, 3, -2, -2, 2, 2, -2, 2, 5, 3, 21, 2, 2, -5, 5, -5, 2, 3, 13, 2, -2
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
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