This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A007732 #93 Jul 02 2025 16:01:55 %S A007732 1,1,1,1,1,1,6,1,1,1,2,1,6,6,1,1,16,1,18,1,6,2,22,1,1,6,3,6,28,1,15,1, %T A007732 2,16,6,1,3,18,6,1,5,6,21,2,1,22,46,1,42,1,16,6,13,3,2,6,18,28,58,1, %U A007732 60,15,6,1,6,2,33,16,22,6,35,1,8,3,1,18,6,6,13,1,9,5,41,6,16,21,28,2,44,1 %N A007732 Period of decimal representation of 1/n. %C A007732 Appears to be a divisor of A007733*A007736. - _Henry Bottomley_, Dec 20 2001 %C A007732 Primes p such that a(p) = p-1 are in A001913. - _Dmitry Kamenetsky_, Nov 13 2008 %C A007732 When 1/n has a finite decimal expansion (namely, when n = 2^a*5^b), a(n) = 1 while A051626(n) = 0. - _M. F. Hasler_, Dec 14 2015 %C A007732 a(n.n) >= a(n) where n.n is A020338(n). - _Davide Rotondo_, Jun 13 2024 %D A007732 J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, pp. 159 etc. %H A007732 Jon E. Schoenfield, <a href="/A007732/b007732.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe) %H A007732 Project Euler, <a href="https://projecteuler.net/problem=26">Reciprocal cycles: Problem 26</a> %H A007732 <a href="/index/1#1overn">Index entries for sequences related to decimal expansion of 1/n</a> %F A007732 Note that if n=r*s where r is a power of 2 and s is odd then a(n)=a(s). Also if n=r*s where r is a power of 5 and s is not divisible by 5 then a(n) = a(s). So we just need a(n) for n not divisible by 2 or 5. This is the smallest number m such that n divides 10^m - 1; m is a divisor of phi(n), where phi = A000010. %F A007732 phi(n) = n-1 only if n is prime and since a(n) divides phi(n), a(n) can only equal n-1 if n is prime. - Scott Hemphill (hemphill(AT)alumni.caltech.edu), Nov 23 2006 %F A007732 a(n)=a(A132740(n)); a(A132741(n))=a(A003592(n))=1. - _Reinhard Zumkeller_, Aug 27 2007 %p A007732 A007732 := proc(n) %p A007732 a132740 := 1 ; %p A007732 for pe in ifactors(n)[2] do %p A007732 if not op(1,pe) in {2,5} then %p A007732 a132740 := a132740*op(1,pe)^op(2,pe) ; %p A007732 end if; %p A007732 end do: %p A007732 if a132740 = 1 then %p A007732 1 ; %p A007732 else %p A007732 numtheory[order](10,a132740) ; %p A007732 end if; %p A007732 end proc: %p A007732 seq(A007732(n),n=1..50) ; # _R. J. Mathar_, May 05 2023 %t A007732 Table[r = n/2^IntegerExponent[n, 2]/5^IntegerExponent[n, 5]; MultiplicativeOrder[10, r], {n, 100}] (* _T. D. Noe_, Oct 17 2012 *) %o A007732 (PARI) a(n)=znorder(Mod(10,n/2^valuation(n,2)/5^valuation(n,5))) \\ _Charles R Greathouse IV_, Jan 14 2013 %o A007732 (Sage) %o A007732 def a(n): %o A007732 n = ZZ(n) %o A007732 rad = 2**n.valuation(2) * 5**n.valuation(5) %o A007732 return Zmod(n // rad)(10).multiplicative_order() %o A007732 [a(n) for n in range(1, 20)] %o A007732 # _F. Chapoton_, May 03 2020 %o A007732 (Python) %o A007732 from sympy import n_order, multiplicity %o A007732 def A007732(n): return n_order(10,n//2**multiplicity(2,n)//5**multiplicity(5,n)) # _Chai Wah Wu_, Feb 07 2022 %Y A007732 Cf. A121341, A066799, A121090, A001913, A084680. %K A007732 nonn,base,easy,nice %O A007732 1,7 %A A007732 _N. J. A. Sloane_, Hal Sampson [ hals(AT)easynet.com ] %E A007732 More terms from _James Sellers_, Feb 05 2000