[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
In base 10 it has length 42, a third of the theoretical maximum of 126. I just convinced myself that base 3 shows the maximum period (that is, 3 is a primitive root of 127). On Thu, May 23, 2013 at 4:54 PM, Bill Gosper <billgosper@gmail.com> wrote:
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 _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
Also related and interesting is 499999 = 31 x 127^2
-----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 _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
----- No virus found in this message. Checked by AVG - www.avg.com Version: 2013.0.3343 / Virus Database: 3184/6354 - Release Date: 05/24/13
participants (3)
-
Allan Wechsler -
Bill Gosper -
David Wilson