Blog Archives

Project Euler Problem #14

February 21, 2009
By

Problem 14 on the Project Euler site asks us to find the longest chain under 1 million created using the Collatz mapping. This is fairly straightforward, although performance again is not great: ## Problem 14 # Collatz conjecture problem14 <-&...

Read more »

Project Euler Problem #12

February 21, 2009
By

Problem 12 on the Project Euler site asks: What is the value of the first triangle number to have over five hundred divisors? A triangular number T(n) is defined as . The R code below consists of a solution, which involves the fact that the number of proper divisors of an integer n can be

Read more »