The nth pentagonal number Pn is the number of dots in diagrams like those below with n concentric pentagons. We have the formula Pn = (3n² − n)/2 where n is a positive integer. If n is an integer but not positive, the equation above defines a generalized pentagonal number. If you’re given an n, you can easily compute Pn. […] The post Testing pentagonal numbers first appeared on John D. Cook .

Testing pentagonal numbers
John
