login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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:
seq(f(ithprime(n)), n=1..1000); # Robert Israel, Jan 14 2016
MATHEMATICA
f[p_] := Module[{x}, For[x = 1, True, x++, If[MultiplicativeOrder[x, p] == (p - 1)/2, Return[x]]]];
f[2] = 1;
f /@ Prime[Range[100]] (* Jean-François Alcover, Jul 17 2020, after Maple *)
CROSSREFS
Cf. A000040.
Sequence in context: A183993 A184403 A198120 * A180343 A332273 A225001
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from David W. Wilson, Aug 15 1996
Offset changed by Robert Israel, Jan 14 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)