Project Euler #72: Counting fractions