TITLE: A link between hooks, contents and parts of a partition
QUESTION [8 upvotes]: Let $\lambda$ be an integer partition: $\lambda=(\lambda_1\geq\lambda_2\geq\dots\geq0)$. Denote its conjugate partition by $\lambda'$. For example, if $\lambda=(4,3,1)$ then $\lambda'=(3,2,2,1)$.
Recall also the notation for the content of a cell $u=(i,j)$ in a partition is $c_u=j−i$. 
I have made the following observation which seems interesting enough to ask here.

QUESTION. Is this true? It might even be known. Is it? Any reference?
  $$\sum_{i\geq1}\lambda_i^2=\sum_{u\in\lambda}(h_u+c_u).$$

REMARK 1. The above identity implies 
$$\sum_{i\geq1}(\lambda_i^2+(\lambda_i')^2)=2\sum_{u\in\lambda}h_u.$$
REMARK 2. It also implies that 
$$\sum_{\lambda\vdash n}\sum_{i\geq1}\lambda_i^2=\sum_{\lambda\vdash n}\sum_{u\in\lambda}h_u.$$

REPLY [8 votes]: Another approach is to notice that $$\sum_{u\in\lambda}h_u=\sum_{u}d_u$$
where $d_u=i+j-1$ for $u=(i,j)$. 
Proof: The easiest way to see this is that both sides count the number of pairs $\{(i_1,j_1),(i_2,j_2)\}\in\lambda$ such that either $i_1=i_2$ and $j_1\le j_2$ or $j_1=j_2$ and $i_1\le i_2$. 

Using this we have
$$\sum_{u\in \lambda}(h_u+c_u)=\sum_{u\in \lambda} (c_u+d_u)=\sum_{(i,j)\in \lambda} (2j-1)=\sum_{i\geq 1}\sum_{j=1}^{\lambda_i}(2j-1)=\sum_{i\geq1} \lambda_i^2$$
which gives us the equality we wanted.