Let $E_n = \{x \in \mathbb{X} \mid (n-1) \leq |f(x)| < n\}$, where $(\mathbb{X}, \mathcal{A}, \mu)$ is a finite measure space (i.e., $\mu(\mathbb{X}) < \infty$) and $f$ is a measurable function. Prove that $f \in L^p \iff \sum n^p \mu(E_n) < \infty$.
One of the implications is very straightforward to me. It is clear that $\mathbb{X} = \bigcup E_n$, where the union is disjoint. Therefore, we have: $$\int_\mathbb{X} |f|^p d\mu = \sum_{n=1}^\infty\int_{E_n} |f|^p d\mu$$
By the definition of the sets, we get the inequalities:
$$\sum_{n=1}^\infty \int (n-1)^p \mathbb{1}_{E_n} d\mu \leq \sum_{n=1}^\infty\int_{E_n} |f|^p d\mu < \sum_{n=1}^\infty \int n^p \mathbb{1}_{E_n} d\mu$$
These, in turn, simplify to
$$\sum_{n=1}^\infty (n-1)^p \mu(E_n) \leq \int_{\mathbb{X}} |f|^p d\mu < \sum_{n=1}^\infty n^p \mu(E_n)$$
Thus, it is immediately apparent that, if the sum converges, then so does the integral, which implies $f \in L^p$.
My problem is in the other implication: $f \in L^p$ implies convergence
I haven't used finite measure yet, so maybe it comes to play. I first thought about expanding $(n-1)^p$, but this would be a mess even if $p$ was an integer (unless in the case where $p = 1$, in which finite measure would imply the result easily).
Does anyone have a hint as per how to proceed?
Thanks in advance!
Hint: $n^p \leqslant 2(n-1)^p$ for large $n$.