Infinite primes proof There is a proof for infinite prime numbers that i don't understand.

right in the middle of the proof:
"since every such $m$ can be written in a unique way as a product of the form:
$\prod_{p\leqslant x}p^{k_p}$. we see that the last sum is equal to: $\prod_{\binom{p\leqslant x}{p\in \mathbb{P}}}(\sum_{k\leqslant 0}\frac{1}{p^k})$.
I don't see that. can anyone can explain this step to me?
 A: Suppose the prime numbers not exceeding $x$ are $2$, $3$, and $5$.  Then
\begin{align}
& \prod_{\begin{smallmatrix} p\in\mathbb P \\  p\le x \end{smallmatrix}} \sum_{k\ge 0} \frac 1 {p^k} \\[10pt] = {} & \left( 1 + \frac 1 2 + \frac 1 4 + \frac 1 8 + \cdots+ \frac 1 {2^k} + \cdots \right) \left( 1 + \frac 1 3 + \frac 1 9 + \frac 1 {27} + \cdots+ \frac 1 {3^k} + \cdots \right) \times {} \\
{} & {} \times \left( 1 + \frac 1 5 + \frac 1 {25} + \frac 1 {125} + \cdots+ \frac 1 {5^k} + \cdots \right) \tag a \\[12pt]
= {} & 1 + \frac 1 2 + \frac 1 3 + \frac 1 4 + \frac 1 5 + \frac 1 6 + \frac 1 8 + \frac 1 9 + \frac 1 {10} + \frac 1 {12} + \frac 1 {15} + \frac 1 {16} \\[6pt]
{} & {} + \frac 1 {18} + \frac 1 {20} + \frac 1 {24} + \frac 1 {25} + \frac 1 {30} + \frac 1 {32} + \frac 1 {36} + \cdots
\end{align}
In this last sum we exclude $1/7$, $1/11$, $1/13$, $1/14$, etc. and include only numbers $1/m$ where $m$ has no prime factors other than $2$, $3$, and $5$.  This last series must converge to a finite number because all three of the series in the line labeled (a) converge to finite numbers.
By contrast, the harmonic series $\displaystyle\sum_{m=1}^\infty \frac 1 m$ diverges to $+\infty$.
A: It's not every such $m$ that can be written as $\prod_{\substack{p\in\mathbb{P},\\ p\leq x}}\sum_{k\geq0}\frac{1}{p}$, it's that the sum of all such $m$ is the same as the product and summation. What your proof is saying are equal is $$\prod_{\substack{p\in\mathbb{P},\\p\leq x}}\sum_{k\geq0}\frac{1}{p}=\sum_{\substack{m \text{ with}\\ \text{prime}\\ \text{factors}\\\leq x}}\frac{1}{m}$$
For example's sake, say $x=6$. Then we're summing over $m$ with prime factors of $2$, $3$, $5$. Listing these out, we have something like
$$\prod_{p\in\{2,3,5\}}\sum_{k=0}^\infty \frac{1}{p^k}=1+\frac{1}{2}+\frac{1}{3}+\frac{1}{2^2}+\frac{1}{5}+\frac{1}{2\cdot 3}+\frac{1}{2^3}+\frac{1}{3^2}+\frac{1}{2\cdot 5}++\frac{1}{2^2\cdot3}+\dots\text{ }.$$
A: Just remember this equation:
$$\zeta(s) = \prod\left(1-\frac{1}{p^s}\right)^{-1}.$$
Where you know $\zeta(1)$ isn't convergent, so if there is a finite quantity of prime numbers, then right part is over, so there is infinite quantity of prime numbers.
A: That is the "fundamental theorem of arithemetic"!
https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic 
A: It's only the distributivity of multiplication w.r.t. addition: suppose there are $n$ primes $p_1, p_2,\dots, p_n$ less than $x$, and let's order the $m$s with only prime divisors in $\{p_1, p_2, \dots, p_n\}$ according to the lexicographical order on the $n$-uples of exponents $i_1$ of $p_1$, $i_2$ of $p_2$, &c. in the prime power decomposition of such $m$s. 
For the sake of simplicity, let's consider the case when $n=2$. We then have:
\begin{align*}
\sum\frac1m=1&+\frac1{p_1}+\frac1{p_1^2}+\frac1{p_1^3}+\dotsm \\
&+\frac1{p_1p_2}+\frac1{p_1^2p_2}+\frac1{p_1^3p_2}+\dotsm\\
&+\frac1{p_1p_2^2}+\frac1{p_1^2p_2^2}+\frac1{p_1^3p_2^2}+\dotsm\\
&\ \ \vdots\\
&=\biggl(1+\frac1{p_1}+\frac1{p_1^2}+\frac1{p_1^3}+\dotsm\biggr)\biggl(1+\frac1{p_2}+\frac1{p_2^2}+\frac1{p_2^3}+\dotsm\biggr)
\end{align*}
