Proof that the real numbers are countable: Help with why this is wrong

I was just thinking about this recently, and I thought of a possible bijection between the natural numbers and the real numbers. First, take the numbers between zero and one, exclusive. The following sequence of real numbers is suggested so that we have bijection.

0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.01, 0.02, ... , 0.09, 0.10, 0.11, ... , 0.99, 0.001, 0.002, ... , 0.999, 0.0001, etc.

Obviously, this includes repeats, but this set is countable. Therefore, the set of all numbers between zero and one is a subset of the above countable set, and is thus countable. Then we simply extend this to all real numbers and all the whole numbers themselves, and since the real numbers, as demonstrated above, between any two whole numbers is countable, the real numbers are the union of countably many countable sets, and thus the real numbers are countable.

Thanks.

-
Liouville number is a good counter example for a non-repeating number which is not in the range of your function. – Asaf Karagila Sep 1 '11 at 13:37
The reals , constructed your way would be the product of ($0,1,2,...,9$) indexed by n in $\mathbb N$, which is not countable. – gary Sep 1 '11 at 13:54
I see this a lot with my undergrads, when did it become common to write decimal numbers between 0 and 1 without the 0 in front of the decimal point? That, and the lack of spaces after commas - I had to stare at this for a minute before I could tell what was going on. – Amit Kumar Gupta Sep 1 '11 at 18:53
0.2, 0.3, 0.4, ... , 0.32, 0.33, 0.34, ..., 0.332, 0.333, 0.334, etc but your set never reach 1/3 therefore it's not real numbers. – user43297 Oct 1 '12 at 22:16

Your function ignores all the real numbers whose decimal representations are not finite, such as

$\dfrac13=0.3333\ldots$

The subset of real numbers that do have finite decimal representations is indeed countable (also because they are all rational and $\mathbb Q$ is countable).

-
Thank you. this makes sense. +1 – analysisj Sep 1 '11 at 13:41

If you know Cantor's diagonalization argument, then you should be able to find a counterexample to your problem using it. Say the method we use to make the $k$-th digit of our new real number different from the $k$-th digit of the $k$-th number in your list is adding 1 to it (and make it 0 if it's 9). Then Cantor's argument gives the number $0.21111111111111...$ Which is not in your list because (as said below) you only have real numbers with finite decimal expansions in your list.

The set you have shown is a list of all rationals between $0$ and $1$ that can be written in the form $x /10^n$ with $x\in\mathbb{Z}$, which is countable. But the full set of reals between $0$ and $1$ is bigger.
All reals are the limit of some sub-sequence of this sequence, but not all are in this sequence, e.g. $\sqrt{2}=1.14142\ldots$ or $\frac{1}{3}=0.33333\ldots$.