Saturday, December 20, 2008

Project Euler Part 2

**This was a draft written in December 2008/January 2009**
I'm publishing it now because, even though it isn't done, it will never get any more done. So that makes it done.

Problem 12: The sequence of triangle numbers is generated by adding the natural numbers. So the 7^(th) triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. What is the value of the first triangle number to have over five hundred divisors?
My first attempt was to iterate through the triangular numbers, checking their number of divisors: