Is the equality $1^2+\cdots + 24^2 = 70^2$ just a coincidence?

Not a coincidence, definitely. $70$ is a Pell number, so $2\cdot 70^2+1=99^2$, and some solutions of

$$ 1^2+2^2+\ldots+n^2 = \frac{n(n+1)(2n+1)}{6} = q^2 $$ can be derived by imposing that both $2n+1$ and $\frac{n(n+1)}{6}$ are squares: that leads to a Pell equation.


There is only one solution(except $1=1$). There is a proof in Mordell's book on Diophantine Equations. The problem is attributed to Lucas:

with N > 1 is when N = 24 and M = 70. This is known as the cannonball problem, since it can be visualized as the problem of taking a square arrangement of cannonballs on the ground and building a square pyramid out of them. It was not until 1918 that a proof (using elliptic functions) was found for this remarkable fact, which has relevance to the bosonic string theory in 26 dimensions.1 More recently, elementary proofs have been published.2

https://en.wikipedia.org/wiki/%C3%89douard_Lucas

Here is a discussion and proof by Bennett

Elementary proof by Anglin

The fact is critically important in the history of the Leech Lattice, the history of finite simple groups, Monstrous Moonshine and other cute things. See page 130 in Ebeling Lattices and Codes (second edition), I will try to find it in SPLAG as well. Yes page 524 in the first edition, chapter Lorentzian Forms for the Leech Lattice.