[go: up one dir, main page]

login
A070670
Smallest m in range 2..n-1 such that m^5 == 1 mod n, or 1 if no such number exists.
1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 6, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 5, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 16, 1, 1, 1, 1, 1, 9, 33, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 16, 1, 15, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 9, 1, 1
OFFSET
1,11
LINKS
MAPLE
a:= proc(n) local m;
for m from 2 to n-1 do
if m &^ 5 mod n = 1 then return m fi
od; 1
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jun 29 2014
MATHEMATICA
a[n_] := (For[m = 2, m <= n - 1, m++, If[PowerMod[m, 5, n] == 1, Return[m]]]; 1); Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2015 *)
PROG
(PARI) a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^5) == 1, return (m)); ); return (1); } \\ Michel Marcus, Jun 29 2014
CROSSREFS
Cf. A070667.
Sequence in context: A030579 A030578 A030577 * A372466 A368472 A368711
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 08 2002
STATUS
approved