Fun with math: Dividing one by 998001 yields a surprising result
11–20 of 99 posts
Re: Fun with math: Dividing one by 998001 yields a surprising result
#12This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
Re: Fun with math: Dividing one by 998001 yields a surprising result
#13This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
I don't have a python shell available... what happens after 999?
EDIT: Um... I answered the good man's question. Could someone explain why this correct answer was voted down so I may improve it? I recognize that it is short, but that's really all there is too it. It's a decimal expansion, not a border collie.
Re: Fun with math: Dividing one by 998001 yields a surprising result
#14Re: Fun with math: Dividing one by 998001 yields a surprising result
#15Re: Fun with math: Dividing one by 998001 yields a surprising result
#16This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
The period is 2997, so set precision to 2997 if you want to see the repeat. Also, "998" doesn't appear 'in sequence' (it obviously appears as 97[9 98]0 981).
Don't really have time to think about this, but you can sort of generate the sum (ie by looking at the pattern) with
(1/1000) * sum i * 1000^-i , i = 0 to infinity
You could try and do a sum of a sum of geometric series and make it work
http://www.wolframalpha.com/input/?i=sum+i+*+1000%5E-i%2C+i%...
(998001 / 2997 = 3)
Re: Fun with math: Dividing one by 998001 yields a surprising result
#17The source with real (readable) text, without annoying animation: http://www.futilitycloset.com/2012/01/08/math-notes-76/
Re: Fun with math: Dividing one by 998001 yields a surprising result
#18Is there a number f(n) such that 1/f(n) yields all n-digit numbers, and is there a formula f to generate them?
Re: Fun with math: Dividing one by 998001 yields a surprising result
#19Re: Fun with math: Dividing one by 998001 yields a surprising result
#20I was searching for some iOS documentation and found this and it's totally ruined my productivity! Can anyone explain why it repeats in this way, or link to a place that has an explanation?