Project Euler #185: Number Mind