Three examples suffice
(832) 422-8646
Contact
You can’t prove a theorem by just checking a few examples. Except sometimes you can.
A few weeks ago I wrote Pentagonal numbers are truncated triangular numbers. In a nutshell, if the pentagonal numbers are defined by
Pn = (3n² − n)/2
and the triangular numbers by
Tn = (n² + n)/2
then
Pn = T2n − 1 − Tn − 1.
Here’s a visualization of the equation.
Note that the equation asserts that two quadratic polynomials are equal. If the two polynomials are equal at three points, then they’re equal everywhere. We might as well make life easy and choose n = 0, 1, and 2.
If you’d like, you could do this in code.
>>> P = lambda n: (3*n**2 - n)/2<br>>>> T = lambda n: (n**2 + n)/2<br>>>> for n in [0, 1, 2]: assert(P(n) == T(2*n-1) - T(n-1))
This provides a rigorous proof, not just a sanity check.
Sometimes checking a few points is not enough to prove an equation with certainty, but it is enough to establish an equation with high probability. More on that here.
Related posts
Testing pentagonal numbers
Binomial coefficient trick
Leave a Reply<br>Your email address will not be published. Required fields are marked *<br>Comment *<br>Name *
Email *
Website
Search for:
John D. Cook, PhD
My colleagues and I have decades of consulting experience helping companies solve complex problems involving data privacy, applied math, and statistics.
Let’s talk. We look forward to exploring the opportunity to help your company too.