def length25(p): x = p-1 i = 2 while x != 1 and i <= 25: x = totient(x) i += 1 return i == 25
import eulerlib N = 1000000 ans = 0 for i in range(2, N + 1): ans += eulerlib.totient(i) print(f'Answer: {ans}')
def solve(): sieve(1000000) return sum(totient(n) for n in xrange(2, 1000001))