Friday, 4 May 2018

Polygonal Number Generating Function and Formula

Today my diurnal age is 25233, a number that happens to be a polygonal number, specifically a 32-gonal number. A WolframAlpha article states that the generating function for the n-gonal numbers is given by: $$G_n(x)= \frac{x \, [(n-3)x+1]}{(1-x)^3} $$ This means that for the 32-gonal numbers, the formula becomes: $$G_{32}(x)= \frac{x \, (33x+1)}{(1-x)^3}$$In WolframAlpha, the coefficients can then be identified using the series command:


In Sage, the Taylor series is generated using the code:
g(x)=x*(33*x+1)/(1-x)^3
g.taylor(x,0,15).coefficients()
When run, this code produces the following output:


In the case of the 36-gonal numbers, the formula for the n-th term is given by:$$a(n)=n(17n-16) $$The general formula for the n-th polygonal number is given by:$$a(n)=(P-2) \frac{n(n+1)}{2}-(P-3)n$$where \(P\) is the number of vertices of the polygon.

In the case of \(P=36 \) (our 36-gon), the formula becomes:$$34\frac{n(n+1)}{2}-33n=n(17n-16) $$Here's a video describing how the formula is derived:

No comments:

Post a Comment