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”).
%I #32 Feb 26 2019 03:45:24
%S 1,0,1,0,0,0,6,0,1,0,2,0,6,0,0,0,16,0,18,0,6,0,22,0,0,0,3,0,28,0,15,0,
%T 2,0,0,0,3,0,6,0,5,0,21,0,0,0,46,0,42,0,16,0,13,0,0,0,18,0,58,0,60,0,
%U 6,0,0,0,33,0,22,0,35,0,8,0,0,0,6,0,13,0,9,0,41,0,0,0,28,0,44,0,6,0,15,0,0,0
%N Order of 10 modulo n [i.e., least m such that 10^m = 1 (mod n)] or 0 when no such number exists.
%C When n is not divisible by 2 or 5, a(n) = A007732(n). A002329 contains the nonzero terms.
%C A number k > 0 appears in this sequence exactly A059892(k) times. - _T. D. Noe_, May 18 2007
%H T. D. Noe, <a href="/A084680/b084680.txt">Table of n, a(n) for n=1..1000</a>
%p A084680 := proc(n) if gcd(n,10) <> 1 then 0 ; elif n = 1 then 1 ; else numtheory[order](10,n) ; end if; end proc: seq(A084680(n),n=2..100) ; # _R. J. Mathar_, Mar 10 2010
%t a[n_] := If[!CoprimeQ[n, 10], 0, MultiplicativeOrder[10, n]]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, Nov 07 2012 *)
%o (PARI) a(n,b=10)=if(gcd(n,b)!=1,0,znorder(Mod(b,n)));
%o vector(66,n,a(n)) \\ _Joerg Arndt_, Nov 15 2014
%o (GAP) List([1..100],n->OrderMod(10,n)); # _Muniru A Asiru_, Feb 26 2019
%Y Cf. A007732, A002329, A070682, A216415.
%K nonn
%O 1,7
%A _Lekraj Beedassy_, Jun 30 2003
%E More terms from _John W. Layman_, Aug 12 2003