A measure is sigma-finite if, and only if, there exists a integrable function w such that its image is contained in (0,1) I have to prove the following proposition:
Consider a measure space $(S,\Sigma,\mu)$. Prove that $\mu$ is $\sigma$-finite if, and only if, there exists $w\in\mathcal{L}^1(S,\Sigma,\mu)$ such that $0<w(s)<1$ for all $s\in S$.
Below, I write a sketch of my proof. May someone check whether it is correct and, if not, help me with the correct answer? Since I started to learn how to use LaTeX only recently, I might have made some typos and I am sorry for them. (For example, I don't know how to write the symbol for the natural numbers.) 
Proof of sufficiency ($\Rightarrow$): Assume that $\mu$ is $\sigma$-finite, i.e., there exists a sequence $\{S_n\}_n$ in $\Sigma$ such that $\mu(S_n)<\infty$ for each $n$ and $S=\bigcup_n S_n$. Without any loss of generality, we can assume that $\{S_n\}_n$ is a sequence of pairwise disjoint sets. For each n, define $f_n=\frac{1_{S_n}}{2^m\mu(S_n)}$ if $\mu(S_m)\neq0$ or $f_n=\frac{1_{S_n}}{2^m}$ if $\mu(S_m)=0$. Pose $w:=\sum_n f_n$ and observe that $0<w(s)<1$ for all $s\in S$ because $\{S_n\}_n$ is a sequence of disjoint sets such that $S=\bigcup_n S_n$. Note also that $\mu(w)=\mu(\sum_n f_n)\leq\sum_n \frac{1}{2^m}=1$, implying that $w\in\mathcal{L}^1(S,\Sigma,\mu)$.
Proof of necessity ($\Leftarrow$): Fix n arbitrarily. Define $S_n:=\{s \in S: \frac{1}{2^n}\leq w(s) \leq \frac{1}{2^{n-1}}\}=w^{-1}([\frac{1}{2^n},\frac{1}{2^{n-1}}))$ and $f_n:=\frac{1_{S_n}}{2^n}$. Observe that $f_n\leq w$, implying that  $\mu(S_n)\leq \infty$. Now, observe that $(0,1)=\bigcup_n [\frac{1}{2^n},\frac{1}{2^{n-1}})$, implying that $S=w^{-1}((0,1))=w^{-1}(\bigcup_n [\frac{1}{2^n},\frac{1}{2^{n-1}}))=\bigcup_n w^{-1}([\frac{1}{2^n},\frac{1}{2^{n-1}}))=\bigcup_n S_n$. Therefore, $\mu$ is $\sigma$-finite.
Thank you very much for your help!

The idea for the proof that the condition is necessary is good. We actually are looking for a sequence of numbers $(c_m)_{m\geqslant 0}$ such that $0\lt c_m\lt 1$ for each $m$  and $\sum_n c_m\mu(S_m)$ converges. In the body of the question, you define $c_m:=2^{-m}/\mu(S_m)$ but the problem is that $\mu(S_m)$ can be small and $c_m$ is not necessarily smaller than $1$. But we can define 
$$c_m:=\frac 12\frac 1{2^m\mu(S_m)+1},$$
which also  contains the case $\mu(S_m)=0$. 
The second part is good, maybe we have to justify the finiteness of the measure of $S_m$ by the integrability of $w$ (it is not explicitely stated in the attempt). 
