by John on (#76B51)
Thenth pentagonal number Pn is the number of dots in diagrams like those below with n concentric pentagons. We have the formula Pn = (3n^2 - n)/2 wheren is a positive integer. Ifn is an integer but not positive, the equation above defines ageneralized pentagonal number. If you're given ann, you can easily compute Pn. [...]The post Testing pentagonal numbers first appeared on John D. Cook.