Series Test for Integrability via the Distribition Function I imagine that the following question has a well known (and perhaps, easily obtainable) answer, but I can't find it by myself nor along the references that I have in mind so far.
So, if $f$ is a nonnegative measurable function defined on some measure space $(\Omega,\mathcal{F},\mu)$ and $\lambda_{f}:[0,+\infty)\to\mathbb [0,+\infty]$ is the distribution function of $f$, namely
$$\lambda_{f}(t)=\mu(f^{-1}(t,+\infty))$$
then for all $p>0$
$$\int f^{p} d\mu=p\int_{(0,+\infty)} t^{p-1}\lambda_{f}(t)dt$$
where $dt$ is Lebesgue measure and both integrals are infinite if $f\notin L^{p}_{\mu}$ (see for instance Folland's Real Analysis: Modern Techniques and their Applications, section 6.4).
This is the question: is the statement $f\in L^{p}_{\mu}$ equivalent to
$$\sum_{n\geq 1} n^{p-1}\lambda_f(n)<\infty?$$
Remarks: 1. If you want, assume that $f$ is  finitely supported. This is: $\lambda_{f}(0)<\infty$.


*Since it is not clear to me whether $t\mapsto t^{p-1}\lambda_{f}(t)$ is decreasing (unless $0<p\leq 1$) I do not know whether the integral test applies.

 A: Note that if $\mu(X)=\infty$, then your series condition doesn't necessarily imply $f\in L_{\mu}^{p}(X)$. For example, take $X=\mathbb{R}$ with Borel $\sigma$-algebra and Lebesgue measure. If $f=1/2\chi_{[0,\infty)}$, then clearly $f\notin L^{p}$; however, $\lambda_{f}(n)=0$ for $n\geq 1$.

Assume that $\lambda_{f}(0)<\infty$. Observe that for $p>0$,
\begin{align*}
\int_{0}^{\infty}t^{p-1}\lambda_{f}(t)\mathrm{d}t=\sum_{n=0}^{\infty}\int_{n}^{n+1}t^{p-1}\lambda_{f}(t)\mathrm{d}t, \tag{1}
\end{align*}
where we allow the possibility that both sides are infinite.
If $p\geq 1$, then it follows from (1) that
\begin{align*}
\sum_{n=0}^{\infty}n^{p-1}\lambda_{f}(n+1)\leq \int_{0}^{\infty}t^{p-1}\lambda_{f}(t)\mathrm{d}t\leq\sum_{n=0}^{\infty}(n+1)^{p-1}\lambda_{f}(n) \tag{2}
\end{align*}
Noting that $n\sim n+1$ as $n\rightarrow\infty$, completes the proof in this case.
If $0<p<1$, then
\begin{align*}
\sum_{n=0}^{\infty}(n+1)^{p-1}\lambda_{f}(n+1)&\leq\int_{0}^{\infty}t^{p-1}\lambda_{f}(t)\mathrm{d}t \tag{3}\\
&\leq\lambda_{f}(0)\int_{0}^{1}t^{p-1}\mathrm{d}t+\sum_{n=1}^{\infty}n^{p-1}\lambda_{f}(n)\\
&=p^{-1}\lambda_{f}(0)+\sum_{n=1}^{\infty}n^{p-1}\lambda_{f}(n)\\
\end{align*}
