Polygonal Number

DOWNLOAD Mathematica Notebook PolygonalNumber

A polygonal number is a type of figurate number that is a generalization of triangular, square, etc., to an n-gon for n an arbitrary positive integer. The above diagrams graphically illustrate the process by which the polygonal numbers are built up. Starting with the nth triangular number T_n, then

 n+T_(n-1)=T_n.
(1)

Now note that

 n+2T_(n-1)=n^2=S_n
(2)

gives the nth square number,

 n+3T_(n-1)=1/2n(3n-1)=P_n,
(3)

gives the nth pentagonal number, and so on. The general polygonal number can be written in the form

p_n^r=1/2n[(n-1)r-2(n-2)]
(4)
=1/2n[(r-2)n-(r-4)],
(5)

where p_n^r is the nth r-gonal number (Savin 2000). For example, taking n=3 in (5) gives a triangular number, n=4 gives a square number, etc.

Polygonal numbers are implemented in the Wolfram Language as PolygonalNumber.

Call a number k-highly polygonal if it is n-polygonal in k or more ways out of n=3, 4, ... up to some limit. Then the first few 2-highly polygonal numbers up to n=16 are 1, 6, 9, 10, 12, 15, 16, 21, 28, (OEIS A090428). Similarly, the first few 3-highly polygonal numbers up to n=16 are 1, 15, 36, 45, 325, 561, 1225, 1540, 3025, ... (OEIS A062712). There are no 4-highly polygonal numbers of this type less than 10^(12) except for 1.

The generating function for the n-gonal numbers is given by the beautiful formula

 G_n(x)=(x[(n-3)x+1])/((1-x)^3).
(6)

Fermat proposed that every number is expressible as at most k k-gonal numbers (Fermat's polygonal number theorem). Fermat claimed to have a proof of this result, although this proof has never been found. Jacobi, Lagrange (in 1772), and Euler all proved the square case, and Gauss proved the triangular case in 1796. In 1813, Cauchy proved the proposition in its entirety.

An arbitrary number N can be checked to see if it is a n-gonal number as follows. Note the identity

 8(n-2)p_n^r+(n-4)^2=(2rn-4r-n+4)^2,
(7)

so 8(n-2)N+(n-4)^2=S^2 must be a perfect square. Therefore, if it is not, the number cannot be n-gonal. If it is a perfect square, then solving

 S=2rn-4r-n+4
(8)

for the rank r gives

 r=(S+n-4)/(2(n-2)).
(9)

An n-gonal number is equal to the sum of the (n-1)-gonal number of the same statistical rank and the triangular number of the previous statistical rank.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.