5
$\begingroup$

We know $\frac{1}{81}$ gives us $0.\overline{0123456790}$

How do we create a recurrent decimal with the property of repeating:

$0.\overline{0123456789}$

a) Is there a method to construct such a number?

b) Is there a solution?

c) Is the solution in $\mathbb{Q}$?

According with this Wikipedia page: http://en.wikipedia.org/wiki/Decimal One could get this number by applying this series. Supppose:

$M=123456789$, $x=10^{10}$, then $0.\overline{0123456789}= \frac{M}{x}\cdot$ $\sum$ ${(10^{-9})}^k$ $=\frac{M}{x}\cdot\frac{1}{1-10^{-9}}$ $=\frac{M}{9999999990}$

Unless my calculator is crazy, this is giving me $0.012345679$, not the expected number. Although the example of wikipedia works fine with $0.\overline{123}$.

Some help I got from mathoverflow site was that the equation is: $\frac{M}{1-10^{-10}}$. Well, that does not work either.

So, just to get rid of the gnome calculator rounding problem, running a simple program written in C with very large precision (long double) I get this result:

#include   int main(void) {   long double b;   b=123456789.0/9999999990.0;   printf("%.40Lf\n", b);  } 

Result: $0.0123456789123456787266031042804570461158$

Maybe it is still a matter of rounding problem, but I doubt that...

Please someone?

Thanks!

Beco

Edited:

Thanks for the answers. After understanding the problem I realize that long double is not sufficient. (float is 7 digits:32 bits, double is 15 digits:64 bits and long double is 19 digits:80 bits - although the compiler align the memory to 128 bits)

Using the wrong program above I should get $0.0\overline{123456789}$ instead of $0.\overline{0123456789}$. Using the denominator as $9999999999$ I must get the correct answer. So I tried to teach my computer how to divide:

#include  int main(void) {     int i;     long int n, d, q, r;     n=123456789;     d=9999999999;     printf("0,");     n*=10;     while(i<100)     {         if(n
  • 0
    @Dr Beco: Enjoy! The input to alpha is: N[123456789/(10^10-1),40]2011-03-29

4 Answers 4

5

Suppose you want to have a number $x$ whose decimal expansion is $0.a_1a_2\cdots a_ka_1a_2\cdots a_k\cdots$. That is it has a period of length $k$, with digits $a_1$, $a_2,\ldots,a_k$.

Let $n = a_1a_2\cdots a_k$ be the integer given by the digits of the period. Then $\begin{align*} \frac{n}{10^{k}} &= 0.a_1a_2\cdots a_k\\ \frac{n}{10^{2k}} &= 0.\underbrace{0\cdots0}_{k\text{ zeros}}a_1a_2\cdots a_k\\ \frac{n}{10^{3k}} &= 0.\underbrace{0\cdots0}_{2k\text{ zeros}}a_1a_2\cdots a_k\\ &\vdots \end{align*}$ So the number you want is $\sum_{r=1}^{\infty}\frac{n}{10^{rk}} = n\sum_{r=1}^{\infty}\frac{1}{(10^k)^r} = n\left(\frac{\quad\frac{1}{10^k}\quad}{1 - \frac{1}{10^k}}\right) = n\left(\frac{10^k}{10^k(10^k - 1)}\right) = \frac{n}{10^k-1}.$ Since $10^k$ is a $1$ followed by $k$ zeros, then $10^k-1$ is $k$ 9s. So the fraction with the decimal expansion $0.a_1a_2\cdots a_ka_1a_2\cdots a_k\cdots$ is none other than $\frac{a_1a_2\cdots a_k}{99\cdots 9}.$

Thus, $0.575757\cdots$ is given by $\frac{57}{99}$. $0.837168371683716\cdots$ is given by $\frac{83716}{99999}$, etc.

If you have some decimals before the repetition begins, e.g., $x=2.385858585\cdots$, then first multiply by a suitable power of $10$, in this case $10x = 23.858585\cdots = 23 + 0.858585\cdots$, so $10x = 23 + \frac{85}{99}$, hence $ x= \frac{23}{10}+\frac{85}{990}$, and simple fraction addition gives you the fraction you want.

And, yes, there is always a solution and it is always a rational.

  • 0
    Thanks @Arturo for this very explanatory solution. Now I got the correct result, with any precision I want, just changing the "while" with the new program (see edition).2011-03-29
1

It's simple: $\rm\displaystyle\ x\ =\ 0.\overline{0123456789}\ \ \Rightarrow\ \ 10^{10}\ x\ =\ 123456789\ +\ x\ \ \Rightarrow\ \ x\ =\ \frac{123456789}{10^{10} - 1}$

Note that the last digit of $\rm\ 10^{10} - 1\ $ is $\:9\:,$ not $\:0\:,$ which explains the error in your program.

  • 0
    @Dr Beco: I assumed the rest would be easy once you had the correct formula.2011-03-29
0

When you say "double" in C how many places is that?

I tried it in Maple...

`

Digits := 40;
40
123456789.0/9999999990.0;
0.01234567891234567891234567891234567891235 `

  • 0
    BTW, what is maple? A language? Do you have any link I could spy on it? Thanks2011-03-29
0

You said:

$M=123456789$, $x=10^{10}$, then $0.\overline{0123456789}= \frac{M}{x}\cdot$ $\sum$ ${(10^{-9})}^k$ $=\frac{M}{x}\cdot\frac{1}{1-10^{-9}}$ $=\frac{M}{9999999990}$

but since the block of repeating digits is 10 digits long, the summation term should be $\sum{(10^{-10})}^k$, so that $0.\overline{0123456789}=\frac{M}{x}\cdot\sum{(10^{-10})}^k=\frac{M}{x}\cdot\frac{1}{1-10^{-10}}=\frac{M}{9999999999}$ and $\frac{M}{9999999999}=\frac{123456789}{9999999999}=\frac{13717421}{1111111111}.$

  • 0
    Thanks! Using your last fraction, the long double can give at least 2 repetitions before lose precision: 0.0123456789 0123456789 04702011-03-29