Triangular numbers with many factors
Mark-Jason Dominus writes about taking a too-sophisticated approach to a puzzler about generating triangular numbers with many divisors, ending up with a program that produced the answer in a minute and a half when someone else's much shorter code took longer to compute but was much easier to write. But it took me only five minutes or so (less than it took to write up this blog entry, anyway) to write an even more sophisticated version of Dominus' idea, that produces the correct answer instantly even running in Python. The trick: I had a generator for already-factored numbers prewritten in PADS and could just plug it in. And of course taking advantage of the analysis Mark wrote up for his solution kept my own thinking time low...here's the code, slightly cleaned up from my original version: