cardinality of a set of finite sequences of natural numbers I recently got into set theory and i was wondering what is the cardinality of a set of all finite sequences of natural numbers?
I know that it is N for natural numbers and 2^N is for real numbers but how can i prove it?
 A: 
Theorem: The set of all finite-length sequences of natural numbers is
countable.

More is true: that follows from

Theorem: (Assuming the axiom of countable choice) The union of
countably many countable sets is countable.

You can find   proofs on this wikipedia page:
https://en.wikipedia.org/wiki/Countable_set
A: You might notice that your set is $\bigcup_{n\in\mathbb{N}}\mathbb{N}^n$. I will assume you know that for every $n\in\mathbb{N}$, $|\mathbb{N}^n|=|\mathbb{N}|$. Then, for each $n\in\mathbb{N}$ there exists a bijection $h_n:\mathbb{N}^n\longrightarrow\mathbb{N}$. The function:
$$\Psi:(x_1,\ldots,x_k)\in\bigcup_{n\in\mathbb{N}}\mathbb{N}^n\longrightarrow\Psi(x_1,\ldots,x_k):=(k,h_k(x_1,\ldots,x_k))\in\mathbb{N}\times\mathbb{N}$$
is bijective. To check it's injective, if $\Psi(x_1,\ldots,x_k)=\Psi(y_1,\ldots,y_p)$ then $(k,h_k(x_1,\ldots,x_k))=(p,h_p(y_1,\ldots,y_p))$, so $k=p$ and $h_k=h_p$. As $h_k$ is a bijection $h_k(x_1,\ldots,x_k)=h_k(y_1,\ldots,y_k)\implies(x_1,\ldots,x_k)=(y_1,\ldots,y_k)$. To check it's surjective, given $(m,n)\in\mathbb{N}\times\mathbb{N}$, $\Psi(h_m^{-1}(n))=(m,h_m(h_m^{-1}(n))=(m,n)$.
Then, $|\bigcup_{n\in\mathbb{N}}\mathbb{N}^n|=|\mathbb{N}\times\mathbb{N}|=|\mathbb{N}|$.
A: Every finite sequence can be thought of as the digits in a terminating decimal, a subset of the rational numbers, so the set of all finite sequences of natural numbers is countably infinite.
A: Take a finite sequence of natural numbers such as $764\ 32\ 87\ 12\ 922$. Write them in base $10$ and replace the space between the numbers with the letter 'a', giving $764a32a87a12a922$. Interprete this as a number written in base $11$. This correspondance is an injective map from the set of finite sequences of natural numbers into ${\mathbb N}$. Hence the set of such sequences is countable.
You can even make this correspondance a bijection if you replace the potential sequence $0a$ at the beginning of a number by $a$.
