We’re taking a break from machine learning to do some fundamental mathematics. Project Euler is a website that hosts mathematics problems of increasing difficulty. In general, these can be solved within a few minutes on a typical computer if programmed properly (many can also be solved by hand with clever tricks to avoid laborious computation). While I find that they have a few too many factoring problems, they’re a great way to get used to a language and working with math. I worked through the first few problems this week.

For the first two problems, I think this worked very well. The problems aren’t particularly difficult, but doing them efficiently can trip you up. I started with the most naive solution and worked up to better ones. If you’ve seen the problems before, you’ll probably arrive directly at the better approaches, but it’s helpful to bootstrap your way there. And I’ve found that minimal iteration is about the only reliable way humans can learn.