%I #15 Oct 05 2024 09:39:11
%S 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,
%T 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,
%U 0,30,3,6,16,0,10,22,16,22,0,5,6,72,36,0,9,30,4,39,0
%N Smallest m in range 1..phi(n) such that 5^m == 1 mod n, or 0 if no such number exists.
%t Table[SelectFirst[Range[EulerPhi[n]], PowerMod[5, #, n] == 1 &, 0],{n, 80}] (* _Paul F. Marrero Romero_, Oct 04 2024 *)
%o (Magma) [0] cat [Modorder(5, n): n in [2..100]]; // _Vincenzo Librandi_, Apr 01 2014
%o (Python)
%o from sympy import n_order
%o def A070677(n): return n_order(5,n) if n%5 and n>1 else 0 # _Chai Wah Wu_, Feb 23 2023
%Y Cf. A070667-A070675, A002326, A070676, A053447, A070681, A070678, A053451, A070679, A070682, A070680, A070683.
%K nonn
%O 1,3
%A _N. J. A. Sloane_ and _Amarnath Murthy_, May 08 2002