An -gon number is a type of figurate number that is a generalization of triangular, square, etc., to an -gon for n an arbitrary positive integer. The th -gon numbers is the number of cannonballs that can be arranged to form a filled in regular -gon of side length . For example, the first few hexagon numbers are , and .
The th -gon pyramidal number is the sum of the first -gon numbers and correspond to the number of cannonballs needed to construct a solid pyramid with filled-in -gon layers. For example, the first few hexagon pyramidal numbers are , and .
We want to ask: For a given , what number of cannonballs can be arranged in a solid -gon based pyramid and rearranged to make a flat, filled-in -gon? Equivalently, which -gon numbers are also -gon pyramidal numbers?
This (when ) is commonly known as the Cannonball Problem. If a number satisfies this condition, it is known as a cannonball number.
For more information: http://mathworld.wolfram.com/CannonballProblem.html, https://www.youtube.com/watch?v=q6L06pyt9CA, http://mathworld.wolfram.com/PyramidalNumber.html, http://mathworld.wolfram.com/PolygonalNumber.html
Below, we will investigat this idea for and and extend the cannonball number to .
Recall that the th -gon number is given by and the th -gon pyramidal number is given by
A number is an -gon cannonball number if and only if it is the th -gon number and the th -gon pyramidal number, for some integers and , greater than 1. Equivalently,
must have a solution , with .
For each of the following equations, for each solution , with , there exists a cannonball number .
For : For : For : For : For :
If there exists a pentagon cannonball number, . Then there would exist for which the th pentagon number is the th pentagon pyramidal number. Equivalently, there must exist an for which.
Using the quadradic formula for to solve for , we have that is an -gon number if and only if is a positive integer. I use this fact for the isPN function.