login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A070677
Smallest m in range 1..phi(n) such that 5^m == 1 mod n, or 0 if no such number exists.
11
0, 1, 2, 1, 0, 2, 6, 2, 6, 0, 5, 2, 4, 6, 0, 4, 16, 6, 9, 0, 6, 5, 22, 2, 0, 4, 18, 6, 14, 0, 3, 8, 10, 16, 0, 6, 36, 9, 4, 0, 20, 6, 42, 5, 0, 22, 46, 4, 42, 0, 16, 4, 52, 18, 0, 6, 18, 14, 29, 0, 30, 3, 6, 16, 0, 10, 22, 16, 22, 0, 5, 6, 72, 36, 0, 9, 30, 4, 39, 0
OFFSET
1,3
MATHEMATICA
Table[SelectFirst[Range[EulerPhi[n]], PowerMod[5, #, n] == 1 &, 0], {n, 80}] (* Paul F. Marrero Romero, Oct 04 2024 *)
PROG
(Magma) [0] cat [Modorder(5, n): n in [2..100]]; // Vincenzo Librandi, Apr 01 2014
(Python)
from sympy import n_order
def A070677(n): return n_order(5, n) if n%5 and n>1 else 0 # Chai Wah Wu, Feb 23 2023
KEYWORD
nonn
AUTHOR
STATUS
approved