[Math] Bijection between Natural numbers and Infinite Cartesian product of Natural numbers

prime numbersset-theory

Consider a function $f(n): \mathbb{N} \rightarrow \mathbb{N} \times \mathbb{N} \times …$ mapping each number $n$ to the set of exponents to raise each prime number $p$ to in order to obtain $n$. For example, $700=2^2 5^2 7$, so $f(700)=(2,0,2,1,0,0,0,…)$. Since prime factorizations are unique, $f$ is injective, and since any possible combination of exponents will be the prime factorization of some $n$, $f$ is also surjective, which implies that $f$ is a bijection.

What puzzles me is that $\mathbb{N}$ is countable, but the infinite Cartesian product should be uncountable. Perhaps I'm overlooking something obvious.

Best Answer

No, $f$ is not surjective, as the range is the set of sequences with only finitely many non-zero entries. For example, you will never have $$f(n)=(1,2,3,4,\ldots)\ .$$