# Cannonball problem

A square pyramid of cannonballs in a square frame

In the mathematics of figurate numbers, the cannonball problem asks which numbers are both square and square pyramidal. The problem can be stated as: given a square arrangement of cannonballs, for what size squares can these cannonballs also be arranged into a square pyramid. Equivalently, which squares can be represented as the sum of consecutive squares, starting from 1?

When cannonballs are stacked within a square frame, the number of balls is a square pyramidal number; Thomas Harriot gave a formula for this number around 1587, answering a question posed to him by Sir Walter Raleigh on their expedition to America.[1] Édouard Lucas formulated the cannonball problem as a Diophantine equation

${\displaystyle \sum _{n=1}^{N}n^{2}=M^{2}}$

or

${\displaystyle {\frac {1}{6}}N(N+1)(2N+1)={\frac {2N^{3}+3N^{2}+N}{6}}=M^{2}}$

and conjectured that the only solutions are N = 1, M = 1, and N = 24, M = 70. It was not until 1918 that G. N. Watson found a proof for this fact, using elliptic functions. More recently, elementary proofs have been published.[2][3] The solution N = 24, M = 70. can be used for constructing the Leech Lattice. The result has relevance to the bosonic string theory in 26 dimensions.[4]

Although it is possible to tile a geometric square with unequal squares, it is not possible to do so with a solution to the cannonball problem. The squares with side lengths from 1 to 24 have areas equal to the square with side length 70, but they cannot be arranged to tile it.

## Related problems

The only numbers that are simultaneously triangular and square pyramidal, are 1, 55, 91, and 208335.[5][6].

There are no numbers (other than the trivial solution 1) that are both tetrahedral and square pyramidal.[6]

2. ^ Ma, D. G. (1985). "An Elementary Proof of the Solutions to the Diophantine Equation ${\displaystyle 6y^{2}=x(x+1)(2x+1)}$". Sichuan Daxue Xuebao. 4: 107–116.