Project Euler 221 - Alexandrian Integers

Official link: https://projecteuler.net/problem=221