Pentagonal Numbers
Inspiration from bug fixes
My latest couple posts are ostensibly about pentagonal numbers, but they’re also about more.
Last night I posted an article about testing whether a number x is a pentagonal number Pn, and if so, how to find the value of n. It’s not likely anyone will ask you to validate a pentagonal number, but you might learn something useful from the derivation of the algorithm and its implementation.
This morning I posted an article about how pentagonal numbers are the difference between two triangular numbers. This isn’t the most useful observation, but the post illustrates a proof technique that is more generally useful.
I got to thinking about pentagonal numbers because someone let me know about an error in an older post. Fixing the error gave me the idea for the posts above.
Similarly, a typo report led to my post yesterday about formally verifying the equations for converting between quaternion and matrix representations of a rotation.


