login
A070676
Smallest m in range 1..phi(n) such that 3^m == 1 mod n, or 0 if no such number exists.
9
0, 1, 0, 2, 4, 0, 6, 2, 0, 4, 5, 0, 3, 6, 0, 4, 16, 0, 18, 4, 0, 5, 11, 0, 20, 3, 0, 6, 28, 0, 30, 8, 0, 16, 12, 0, 18, 18, 0, 4, 8, 0, 42, 10, 0, 11, 23, 0, 42, 20, 0, 6, 52, 0, 20, 6, 0, 28, 29, 0, 10, 30, 0, 16, 12, 0, 22, 16, 0, 12, 35, 0, 12, 18, 0, 18, 30, 0
OFFSET
1,4
MATHEMATICA
Table[SelectFirst[Range[EulerPhi[n]], PowerMod[3, # , n]==1&, 0], {n, 80}] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, Aug 18 2015 *)
PROG
(Magma) [0] cat [Modorder(3, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
KEYWORD
nonn
AUTHOR
STATUS
approved