Project Euler #114: Counting block combinations I