# Polygonal Number

A common mathematical formula for n-th polygonal number with s numbers of side is

$P_{s,n}=\frac{(s-n)n^2-(s-4)n}{2}$

which has solutions :

$n=\frac{s-4}{2s-4} \pm \sqrt{\frac{(s-4)^2}{(2s-4)^2}+\frac{2P_{s,n}}{s-2}}$

The following images are generated using polar plot of the equations :

Reference :

N. Lindblad. 2007. A General Algorithm for Testing Polygonal Candidates. Available here.