Search: id:A051626 Results 1-1 of 1 results found. %I A051626 %S A051626 0,0,1,0,0,1,6,0,1,0,2,1,6,6,1,0,16,1,18,0,6,2,22,1,0,6,3,6,28,1,15,0, %T A051626 2,16,6,1,3,18,6,0,5,6,21,2,1,22,46,1,42,0,16,6,13,3,2,6,18,28,58,1,60, %U A051626 15,6,0,6,2,33,16,22,6,35,1,8,3,1,18,6,6,13,0,9,5,41,6,16,21,28,2,44,1 %N A051626 Period of decimal representation of 1/n, or 0 if 1/n terminates. %H A051626 Eric Weisstein's World of Mathematics, Repeating Decimal %H A051626 Index entries for sequences related to decimal expansion of 1/n %F A051626 a(n)=A132726(n,1); a(n)=a(A132740(n)); a(A132741(n))=a(A003592(n))=0. - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 27 2007 %p A051626 isCycl := proc(n) local ifa,i ; if n <= 2 then RETURN(false) ; fi ; ifa := ifactors(n)[2] ; for i from 1 to nops(ifa) do if op(1,op(i,ifa)) <> 2 and op(1,op(i,ifa)) <> 5 then RETURN(true) ; fi ; od ; RETURN(false) ; end: A051626 := proc(n) local ifa,sh,lpow,mpow,r ; if not isCycl(n) then RETURN(0) ; else lpow:=1 ; while true do for mpow from lpow-1 to 0 by -1 do if (10^lpow-10^mpow) mod n =0 then RETURN(lpow-mpow) ; fi ; od ; lpow := lpow+1 ; od ; fi ; end: for n from 1 to 600 do printf("%d %d ",n,A051626(n)) ; od ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 19 2006 %t A051626 r[x_]:=RealDigits[1/x]; w[x_]:=First[r[x]]; f[x_]:=First[w[x]]; l[x_]:=Last[w[x]]; z[x_]:=Last[r[x]]; %t A051626 d[x_] := Which[IntegerQ[l[x]], 0, IntegerQ[f[x]]==False, Length[f[x]], True, Length[l[x]]]; Table[d[i], {i,1,90}] (from Hans Havermann, Oct 19 2006) %t A051626 fd[n_] := Block[{q},q = Last[First[RealDigits[1/n]]];If[IntegerQ[q], q = {}];Length[q]];Table[fd[n], {n, 100}] (*Chandler*) %Y A051626 Essentially same as A007732. Cf. A048595, A006883, A036275, A114205, A114206. %Y A051626 Sequence in context: A060297 A137378 A084680 this_sequence A137785 A134899 A076413 %Y A051626 Adjacent sequences: A051623 A051624 A051625 this_sequence A051627 A051628 A051629 %K A051626 nonn,base,easy,nice %O A051626 1,7 %A A051626 J. Lowell (jhbubby(AT)avana.net) %E A051626 More terms from James A. Sellers (sellersj(AT)math.psu.edu) Search completed in 0.001 seconds