$\forall x \in \mathbb{R}$ show that $x=\sum_{n=1}^\infty k_na_n = \prod_{n=1}^{\infty}m_na_n$ ... Yet again, another cool problem from the book "problems in mathematical analysis" by Piotr & Witkowski:
Prove that if $a_n \neq 0$, $n=1,2,\cdots$ and $\displaystyle \lim_{n \to \infty} a_n = 0$, then for every real number $x$ there exist the integer sequences $(k_n)$ and $(m_n)$ such that $$x=\sum_{n=1}^\infty k_na_n = \prod_{n=1}^{\infty}m_na_n$$

My proposed solution for the infinite sum (I haven't solved the infinit product):


*

*$1$st step, Simplification of the problem:

It suffices to prove it for every $x \in \mathbb{R}^+$ because if $x=0$ then we can take every $k_n$ to be $0$ and if $x<0$ then $-x>0$ and we can multiply all $k_n$'s by $-1$ to find a new sequence $k_n' = -k_n$.
Also, instead of working with $a_n$ we can work with $|a_n|$, becase if for some $n$ the term $a_n$ is positive then it comes out of the absolute value and if $a_n$ is negative we simply multiply $k_n$ by $-1$.

*

*$2$nd Step, construction of the sequence $(k_n)$
So, let's assume without loss of generality that $x>0$. Since $\displaystyle \lim_{n \to \infty} a_n = 0$ there exists a natural number $N$ such that $\forall n \in \mathbb{N}: n \geq N \implies |a_n| < \epsilon$.
Let $\epsilon=x$, then for any $n \geq N$,  $|a_n|<x$.
Now we set $k_1= k_2= \cdots = k_{N-1} = 0$.
We set $k_N=1$, then since $x_1 = x - |a_N|>0$ by the Archemedean property of the reals, there exists $N_1$ such that: $N_1 \cdot|a_{N+1}| \geq x - |a_N|$.
Set $k_{N+1} = \min\{ m \in \mathbb{N}: m \cdot |a_{N+1}| \geq x - |a_N|\} - 1$. We'll have:
$$k_{N+1} \cdot |a_{N+1}| < x - |a_N| \implies |a_N| + k_{N+1}|a_{N+1}|<x$$
Now we repeat the same procedure with $x_2 = x - |a_N| - k_{N+1}|a_{N+1}|$ and find $k_{N+2}$ such that $|a_N| + k_{N+1}|a_{N+1}| + k_{N+2}|a_{N+2}| < x$ and we continue this procedure at each step in this way:
We set $x_i = x - (|a_N| + k_{N+1}|a_{N+1}| + \cdots + k_{N+i-1}|a_{N+i-1}|)$
Since $x_i>0$, by using the Archemedean property we can find $N_i \in \mathbb{N}$ such that $N_i \cdot |a_{N+i}| \geq x_i$
We set $k_{N+i} = \min\{ m \in \mathbb{N}: m \cdot |a_{N+i}| \geq x_i\} - 1$. This implies $k_{N+i}|a_{N+i}| < x_i = x - (|a_N| + k_{N+1}|a_{N+1}| + \cdots + k_{N+i-1}|a_{N+i-1}|)$, therefore:
$$|a_N| + k_{N+1}|a_{N+1}| + \cdots + k_{N+i-1}|a_{N+i-1}|+k_{N+i}|a_{N+i}| < x$$
So, we can continue this process as many times as it's needed.

*

*$3$rd step, Why $x=\sum_{n=1}^\infty k_na_n$?

The sum $S_i = \sum_{m=N}^{N+i} k_{m}|a_m|$ is a series with positive terms and is bounded above by $x$, therefore $S_i$ is convergent and by construction it is obvious that $\lim_{i \to \infty} S_i = x$.
Now we construct $\sum_{n=1}^{\infty} k'_n a_n$ in this way:

*

*If $n < N$, then $k_n = 0$.

*If $a_n>0$, then $k'_n = k_n$, otherwise $k'_n = -k_n$.

Therefore: $\sum_{n=1}^\infty k'_na_n = \sum_{m=N}^{\infty} k_n|a_n|=x$

Is my proof correct? So, if this problem appears in an exam ora competition, will I get the full point?
And how can I proceed to solve the second one? Please don't give full solutions, just hints and helps if possible.

Thanks in advance.
 A: As for $x=\prod\limits_{n=1}^{\infty}m_na_n$, taking a logarithm we have
$$\log x=\sum_{n=1}^{\infty}\log m_na_n=\sum_{n=1}^{\infty}(\log m_n+\log a_n)$$
assuming everything was positive.
Now $\log a_n\to-\infty$, so by choosing $m_n=1$ you can get arbitrarily low, by choosing $m_n$ very large you can get arbitrarity high.
If you choose $m_n$ in such a way you push the sum closest to $\log x$, you can get it to converge to $\log x$, because $\log(k+1)-\log k$ gets arbitrarity small as $k$ gets large and your $m_n$ will get large because $\log a_n\to-\infty$.
Now it's obvious you can do it and I'll leave the formal proof up to you :)
A: Hint. Let without loss of generality $x>0$, and  $k_1$, such that  $k_1a_1\ge x$. 
If $d_1=k_1a_1-x=0$, then we set $k_j=0$, for all $j\ge 2$, and we are done. 
If $d_1=k_1a_1-x>0$. As $a_n\to 0$, there exists an $m_1>1$, such that $|a_{m_1}|<d_1$, and then, for a suitable integer $\ell$:
$$
|a_{m_1}|>\lvert k_1a_1+\ell a_{m_1} -x\rvert.
$$
We set $k_2=\cdots=k_{m_1-1}=0$ and $k_{m_1}=\ell$.
We repeat the same procedure and obtain after $j$ steps
$$
\lvert k_1a_1+k_{m_1} a_{m_1}+\cdots k_{m_j}a_{m_j} -x\rvert< \lvert a_{m_j}\rvert\to 0.
$$
In the case of the product, each time we multiply by $m_na_n$, for a suitable $m_n$, which takes up closer to $x$.
