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!)
A070671 Smallest m in range 2..n-1 such that m^6 == 1 mod n, or 1 if no such number exists. 1
1, 1, 2, 3, 4, 5, 2, 3, 2, 9, 10, 5, 3, 3, 4, 7, 16, 5, 7, 9, 2, 21, 22, 5, 24, 3, 8, 3, 28, 11, 5, 15, 10, 33, 4, 5, 10, 7, 4, 9, 40, 5, 6, 21, 4, 45, 46, 7, 18, 49, 16, 3, 52, 17, 21, 3, 7, 57, 58, 11, 13, 5, 2, 31, 4, 23, 29, 33, 22, 9, 70, 5, 8, 11, 26, 7, 10, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
MAPLE
a:= proc(n) local m;
for m from 2 to n-1 do
if m &^ 6 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_] := Module[{m}, For[m = 2, m <= n-1, m++, If[PowerMod[m, 6, n] == 1, Return[m]]]; 1];
Array[a, 100] (* Jean-François Alcover, Nov 17 2020 *)
PROG
(PARI) a(n) = {for (m=2, n-1, if (lift(Mod(m, n)^6) == 1, return (m)); ); return (1); } \\ Michel Marcus, Jun 29 2014
CROSSREFS
Cf. A070667.
Sequence in context: A165072 A141404 A212176 * A119281 A328943 A173525
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 08 2002
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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)