# Cantor's Diagonalization applied to rational numbers

Suppose we consider the decimal representation of rational numbers less than 1 and consider them as a sequence. Now consider all such rational numbers where it is known that the period for each of the sequence is bounded by some number $M$. Now I construct a new sequence where the $n$-th digit is $2$ if the $n$-th digit in the $n$-th rational number in the original sequence is not equal to 2 and is 3 if the $n$-th digit in the $n$-th rational number in the original sequence is equal to 2. Now is it correct that the period of the new sequence is the least common multiple of the periods of the original sequence ? How to prove it ?

Can the new sequence be periodic for some other way of constructing the new number ? Or, it can be proved that it can never be periodic. Because each time I am taking just one element from the original sequences whether the original sequence is periodic or not that does not make any difference in the new sequence. Is this the reason ?

• To quote myself: »Why should the decimal expansion constructed from the diagonal of the list yield a rational number?« – user642796 Oct 6 '13 at 12:28
• if the period of each original rationals is "bounded" then won't the period of the new sequence be a finite number if it is the lcm of individual periods? But why it is lcm is not clear to me. – user96000 Oct 6 '13 at 12:34
• The problem is that the bounding constant can grow as you add more sequences in. – Kris Oct 6 '13 at 12:40
• @user96000: Even though the period lengths might be bounded, there's no saying when the period begins. – user642796 Oct 6 '13 at 12:48
• @Kris: won't the period of the new sequence be upper bounded by $lcm(1,2,3,\dots,M)$ ? I did not understand what do you mean by bounding constant can grow ... – user96000 Oct 6 '13 at 13:01

No, the resulting number can be irrational, even if $M=1$, it all depends on how you enumerate the numbers. You could decide to first define at every prime index a rational number that ends with an infinite nmber of 2's, at every unused prime index +2 a number that ends with an infinite number of 3's and then distribute the remaining numbers randomly over the ununsed spots. It is clear that the result will not have period 1.