Project Euler 516 - 5-smooth totients

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

Note: My code takes around ~160s, ~40s with pypy

Thought Process

First step is to search for some properties of Euler's Totient Function if you don't know them already, after that it is not difficult to prove the possible factors of n

Knowing this, all we need to do is:

Interactive Code

Enter an integer < 10^10, because unfortunately my code is a little too slow, 10^10 takes ~ 7 seconds

S(10^11) = 3340605175, for those who need the test case!

Code will output S(yourinput) mod 2^32