|
|
A001390
|
|
Smallest multiplicative generator for quadratic residues mod prime(n).
|
|
2
|
|
|
1, 1, 4, 2, 3, 4, 2, 4, 2, 4, 7, 3, 2, 9, 2, 4, 3, 4, 4, 2, 6, 2, 3, 5, 2, 4, 2, 3, 12, 9, 9, 3, 2, 4, 4, 5, 3, 4, 2, 4, 3, 4, 2, 2, 4, 2, 4, 9, 3, 5, 7, 2, 3, 3, 9, 2, 4, 2, 7, 5, 6, 4, 7, 2, 2, 4, 5, 3, 3, 3, 9, 2, 2, 3, 4, 2, 4, 3, 2, 2, 3, 4, 5, 6, 5, 3, 2, 3, 4, 2, 3, 2, 2, 4, 5, 2, 4, 2, 4, 4, 4, 4, 3, 2, 5, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
MAPLE
|
f:= proc(p) local x;
for x from 1 do if numtheory:-order(x, p) = (p-1)/2 then return x fi od
end proc:
f(2):= 1:
|
|
MATHEMATICA
|
f[p_] := Module[{x}, For[x = 1, True, x++, If[MultiplicativeOrder[x, p] == (p - 1)/2, Return[x]]]];
f[2] = 1;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|