示例#1
0
def length25(p):
    x = p-1
    i = 2
    while x != 1 and i <= 25:
        x = totient(x)
        i += 1
    return i == 25
示例#2
0
import eulerlib

N = 1000000
ans = 0
for i in range(2, N + 1):
    ans += eulerlib.totient(i)

print(f'Answer: {ans}')
示例#3
0
def solve():
    sieve(1000000)
    return sum(totient(n) for n in xrange(2, 1000001))