# Walnut Math

A friend from China gave us a bag of walnuts plucked from their home-grown walnut tree. I decide to count them by applying math:

A stack of walnuts piled in a pyramid, with base layer arranged in a square of 6×6 walnuts, above layers 5×5, 4×4, 3×3, 2×2, and finally top 1 (1×1).

How many walnuts are there in total ? (Answer: 91)

This is simple math but only taught in A-level (with proof by induction).

$\displaystyle \boxed { \sum_{1}^{n} k^2 =\frac { n (n+1)(2n+1)} {6} }$
If $k^2$ is changed to $\frac {1}{k^2}$, this is Euler’s “Basel Problem” which leads to the unsolved Riemann Hypothesis.