I came across the following interesting problem in my self-study:
Let $f: X \rightarrow [0, \infty]$ be a measurable function. Assume that $\mu(X) < \infty$. Prove that $\int f \; d\mu < \infty$ if and only if $\sum_{n=1}^\infty 2^n \mu(x \in X : f(x) \geq 2^n) < \infty.$
I am having trouble thinking of where to begin in proving this result, and wanted to see if anyone visiting had some suggestions on how to proceed.