David Wilson>Also related and interesting is 499999 = 31 x 127^2 ----------------- In[209]:= RealDigits[1/499999] Out[209]= A very large output was generated. Here is a sample of it: {{{2,0,0,0,0,0,4,0,0,0,0,0,8,0,0,0,0,1,6,0,0,0,0,3,2,0,0,0,0,6,4,0,0,0,1,2,8,0,0,0,2,5, <<26587>>, 5,1,5,6,2,5,0,3,1,2,5,0,0,6,2,5,0,0,1,2,5,0,0,0,2,5,0,0,0,0,5,0,0,0,0,1,0,0,0,0,0}},<<1>>} In[213]:= Length[%209[[1,1]]] Out[213]= 26670 In[214]:= %209[[2]] Out[214]= -5 It "abbreviated" -5 to <<1>> !! In[212]:= Length[RealDigits[1/499999,2][[1,1]]] Out[212]= 4445 I would have expected shorter periods. --rwg -----Original Message----- From: math-fun-bounces@mailman.xmission.com [mailto:math-fun- bounces@mailman.xmission.com] On Behalf Of Bill Gosper Sent: Thursday, May 23, 2013 4:55 PM To: math-fun@mailman.xmission.com Subject: [math-fun] exact inches per meter has a long repeating decimal: In[170]:= RealDigits[100/(254/100)] Out[170]= {{{3, 9, 3, 7, 0, 0, 7, 8, 7, 4, 0, 1, 5, 7, 4, 8, 0, 3, 1, 4, 9, 6, 0, 6, 2, 9, 9, 2, 1, 2, 5, 9, 8, 4, 2, 5, 1, 9, 6, 8, 5, 0}}, 2} I.e. 39.3700... But the binary is very short: In[171]:= RealDigits[100/(254/100), 2] Out[171]= {{1, 0, 0, {1, 1, 1, 0, 1, 0, 1}}, 6} i.e. 100111.0101... Likewise the octal: In[172]:= RealDigits[100/(254/100), 8] Out[172]= {{4, {7, 2, 7, 5, 3, 6, 5}}, 2} Reason: 254 = 2*(2^7 - 1) . --rwg