"In [problem 1](https://projecteuler.net/problem=1), we applied the following formula for [triangular numbers](https://en.wikipedia.org/wiki/Triangular_number):\n",
"A similar formula exists for computing sums of squares, also called the [square pyramidal numbers](https://en.wikipedia.org/wiki/Square_pyramidal_number):\n",
"(In fact, [Faulhaber's formula](https://en.wikipedia.org/wiki/Faulhaber%27s_formula) gives a formula for the sum of $k$th powers, but we obviously only need the cases $k=1$ and $k=2$ for this problem.) Consequently,\n",