Project Euler #221: Alexandrian Integers