A link between hooks, contents and parts of a partition

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.


You can prove this by inductively adding boxes to the outside corners of $\lambda$. It is true for $\lambda=\varnothing$. And when you add box $(i,j)$ as an outside corner, you change the sum $\sum_{i \geq 1} \lambda_i^2$ only in the $i$-term where you increase it by $2j-1$; while the hooks increase by one for the $i-1+j-1$ boxes directly to the left or directly above $(i,j)$, and the new hook length of $(i,j)$ plus the new content of $(i,j)$ gives you a total increase to the RHS of $(i-1+j-1)+(1+j-i)=2j-1$.