OFFSET
0,1
COMMENTS
EXAMPLE
4 is not the largest primitive root mod any number.
1 is the largest primitive root mod 2.
3 is the largest primitive root mod 4 and mod 5.
47 is the largest primitive root mod 49, 50, and 54.
5 is the largest primitive root mod 6, 7, 9, and 14.
MAPLE
f:= proc(b) local x, t;
t:= numtheory:-phi(b);
for x from b-1 by -1 do if igcd(x, b) = 1 and numtheory:-order(x, b)=t then return x fi od
end proc:
f(1):= 0:
cands:= select(t -> t=1 or numtheory:-primroot(t) <> FAIL, [$1..1000]):
R:= map(f, cands):
S:= sort(convert(convert(R, set), list)):
V:= Array(0..10): V[0]:= 4:
for s in S do
v:= numboccur(s, R);
if V[v] = 0 then V[v]:= s fi
od:
convert(V, list); # Robert Israel, Dec 01 2024
CROSSREFS
KEYWORD
nonn,more,new
AUTHOR
Robert Israel, Dec 01 2024
STATUS
approved