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
or
Lucas conjectured that the only solutions are (N,M) = (0,0), (1,1), and (24,70), using either 0, 1, or 4900 cannonballs. 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.23
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.
A triangular-pyramid version of the cannonball problem, which is to yield a perfect square from the Nth Tetrahedral number, would have N = 48. That means that the (24 × 2 = ) 48th tetrahedral number equals to (702 × 22 = 1402 = ) 19600. This is comparable with the 24th square pyramid having a total of 702 cannonballs.5
Similarly, a pentagonal-pyramid version of the cannonball problem to produce a perfect square, would have N = 8, yielding a total of (14 × 14 = ) 196 cannonballs.6
The only numbers that are simultaneously triangular and square pyramidal are 1, 55, 91, and 208335.78
There are no numbers (other than the trivial solution 1) that are both tetrahedral and square pyramidal.9
Darling, David. "Cannonball Problem". The Internet Encyclopedia of Science. http://www.daviddarling.info/encyclopedia/C/Cannonball_Problem.html ↩
Ma, De Gang (1984). "An Elementary Proof of the Solutions to the Diophantine Equation 6 y 2 = x ( x + 1 ) ( 2 x + 1 ) {\displaystyle 6y^{2}=x(x+1)(2x+1)} ". Chinese Science Bulletin. 29 (21): 1343–1343. doi:10.1360/csb1984-29-21-1343. https://www.sciengine.com/doi/pdfView/6949ebef4d2c4985a6b6707fb16676c7 ↩
Anglin, W. S. (1990). "The Square Pyramid Puzzle". American Mathematical Monthly. 97 (2): 120–124. doi:10.2307/2323911. JSTOR 2323911. /wiki/American_Mathematical_Monthly ↩
"week95". Math.ucr.edu. 1996-11-26. Retrieved 2012-01-04. http://math.ucr.edu/home/baez/week95.html ↩
Sloane, N. J. A. (ed.). "Sequence A000292 (Tetrahedral (or triangular pyramidal) numbers: a(n) = C(n+2,3) = n*(n+1)*(n+2)/6)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation. /wiki/Neil_Sloane ↩
Sloane, N. J. A. (ed.). "Sequence A002411 (Pentagonal pyramidal numbers: a(n) = n^2*(n+1)/2)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation. /wiki/Neil_Sloane ↩
Sloane, N. J. A. (ed.). "Sequence A039596 (Numbers that are simultaneously triangular and square pyramidal)". The On-Line Encyclopedia of Integer Sequences. OEIS Foundation. /wiki/Neil_Sloane ↩
Weisstein, Eric W. "Square Pyramidal Number". MathWorld. /wiki/Eric_W._Weisstein ↩