gtwalford's hack of euler3