recurring numbers
-
- Catbabel
- Posts: 780
- Joined: Sat Nov 16, 2019 8:18 am
recurring numbers
I had to work out the fraction that 39 represented of 99, and was pleased to find it was 0.39393939....and any fraction x of 99 (up to 99, obviously, and above that the pattern shifts) is the recurrent value 0.x. Is there a name for this property?
Re: recurring numbers
That’s really neat, I never knew that. Haven’t got an answer for you though.Allo V Psycho wrote: ↑Mon Dec 04, 2023 9:51 amI had to work out the fraction that 39 represented of 99, and was pleased to find it was 0.39393939....and any fraction x of 99 (up to 99, obviously, and above that the pattern shifts) is the recurrent value 0.x. Is there a name for this property?
where once I used to scintillate
now I sin till ten past three
now I sin till ten past three
Re: recurring numbers
There's a mathematical explanation for this, and it runs roughly as follows:
The repeating decimal 0.ababababababab.... can be written as
ab * (0.01 + 0.0001 + 0.000001 + other terms with number of zeros increasing by 2), which can be summarised as
ab * sum of 0.01^n as n goes from 1 to infinity.
This is a geometric series, with common ratio 0.01 and can be summed using the formula a/(1-r) where a is the first term and r is the common ratio.
1 - 0.01 is 0.99, and the first term is 0.ab, so it simplifies to:
0.ab/0.99 = ab/99.
A similar technique can be used for other repeating decimals - 0.abcabcabcabcabcabc... for instance is abc/999 (the common ratio is 1/1000 in the geometric series for this one) - and can be extended to a method to calculate the fraction for any decimal which eventually repeats.
The repeating decimal 0.ababababababab.... can be written as
ab * (0.01 + 0.0001 + 0.000001 + other terms with number of zeros increasing by 2), which can be summarised as
ab * sum of 0.01^n as n goes from 1 to infinity.
This is a geometric series, with common ratio 0.01 and can be summed using the formula a/(1-r) where a is the first term and r is the common ratio.
1 - 0.01 is 0.99, and the first term is 0.ab, so it simplifies to:
0.ab/0.99 = ab/99.
A similar technique can be used for other repeating decimals - 0.abcabcabcabcabcabc... for instance is abc/999 (the common ratio is 1/1000 in the geometric series for this one) - and can be extended to a method to calculate the fraction for any decimal which eventually repeats.
Last edited by geejaytee on Mon Dec 04, 2023 11:56 am, edited 1 time in total.
Re: recurring numbers
Quote rather than edit, ha.
Re: recurring numbers
It's just called a repeating or recurring decimal.
https://en.m.wikipedia.org/wiki/Repeating_decimal
I would be interested to check whether it's the same for any number n , nn, nnn etc expressed in Base n+1.
I think it seems likely
https://en.m.wikipedia.org/wiki/Repeating_decimal
I would be interested to check whether it's the same for any number n , nn, nnn etc expressed in Base n+1.
I think it seems likely
My avatar was a scientific result that was later found to be 'mistaken' - I rarely claim to be 100% correct
ETA 5/8/20: I've been advised that the result was correct, it was the initial interpretation that needed to be withdrawn
Meta? I'd say so!
ETA 5/8/20: I've been advised that the result was correct, it was the initial interpretation that needed to be withdrawn
Meta? I'd say so!
Re: recurring numbers
I think GJT's explanation above applies to bases other than ten. However, I can't make it work with hexadecimal floats in Python, but I think that's because <float>.hex() doesn't actually convert the float to base 16, but instead shows the hexadecimal for the IEEE representation of the decimal float.Gfamily wrote: ↑Mon Dec 04, 2023 12:32 pmIt's just called a repeating or recurring decimal.
https://en.m.wikipedia.org/wiki/Repeating_decimal
I would be interested to check whether it's the same for any number n , nn, nnn etc expressed in Base n+1.
I think it seems likely
e.g. replace:
with:1 - 0.01 is 0.99, and the first term is 0.ab, so it simplifies to:
0.ab/0.99 = ab/99.
1 - 0.01 is 0.ff, and the first term is 0.ab, so it simplifies to:
0.ab/0.ff = ab/ff.
Re: recurring numbers
999999 has factors including 7, 13 and 37. But they are factors of no smaller integer made up of repeated 9s, as with 3 and 11. (3, 7, 11, 13 and 37 are the only prime factors of 999999). That is why the recurring decimals for n/7, n/13 and n/37, and compounds of those such as n/91, have a repeated group of 6 figures.
It is easy to understand that any prime p (that is not a factor of 10) must have a recurring decimal of at most p-1 digits. This is apparent because when you are doing a long division to it work out, it must cycle back to where you started in at most p-1 steps. That's because the remainder is always a number somewhere from 1 to p-1. So that presents an interesting way of discovering that any prime p (that is not a factor of 10) must divide exactly into at least one integer made up of repeated 9s of at most p-1 digits. Also true for repeated 1s and repeated 3s, for we can take out the factors of 3.
It is easy to understand that any prime p (that is not a factor of 10) must have a recurring decimal of at most p-1 digits. This is apparent because when you are doing a long division to it work out, it must cycle back to where you started in at most p-1 steps. That's because the remainder is always a number somewhere from 1 to p-1. So that presents an interesting way of discovering that any prime p (that is not a factor of 10) must divide exactly into at least one integer made up of repeated 9s of at most p-1 digits. Also true for repeated 1s and repeated 3s, for we can take out the factors of 3.