Let $(a_n)_n$ be a sequence of non-negative real numbers.
I fail to see a formal proof of the following (conjectured) equality: $$ \sum_{n=0}^\infty \sum_{k=n}^{\infty} a_k = \sum_{n=0}^{\infty} (n+1)a_n. $$
Roughly speaking the claim follows from expanding the LHS: $$ \sum_{n=0}^\infty \sum_{k=n}^{\infty} a_k = \sum_{k=0}^{\infty} a_k + \sum_{k=1}^{\infty} a_k + \ldots + \sum_{k=i}^{\infty} a_k + \ldots $$ Now it is easy to see that each term $a_k$ appears in exactly $(k+1)$ terms in RHS (e.g. writing column-wise the different sums), so it is intuitively clear that it has to be $\sum_{n=0}^{\infty} (n+1)a_n$.
However I am not satisfied of this informal hand-waving proof. Any hints/helps to make it formal? Thanks.

We can use the indicator function
$$\mathbf{1}_{\{k\geqslant n\}} = \begin{cases}1,&k \geqslant n \\0, &k < n\end{cases},$$
and nonnegativity of $a_k$ to obtain
$$\sum_{n = 0}^\infty\sum_{k=n}^\infty a_k = \sum_{n = 0}^\infty\sum_{k=0}^\infty \mathbf{1}_{\{k\geqslant n\}}a_k \,\underbrace{= \sum_{k = 0}^\infty\sum_{n=0}^\infty \mathbf{1}_{\{k\geqslant n\}}a_k }_{\text{applying Tonelli's theorem}} = \sum_{k = 0}^\infty a_k\sum_{n=0}^\infty \mathbf{1}_{\{k\geqslant n\}} \\ = \sum_{k = 0}^\infty a_k\sum_{n=0}^k (1) = \sum_{k=0}^\infty (k+1)a_k = \sum_{n=0}^\infty (n+1)a_n$$ Clearly, the last step is just replacing letter "k" with letter "n".