示例#1
0
from phi import totient

d = 10**6
s = 0
while d > 1:
    s += totient(d)
    d -= 1

print s
示例#2
0
def h(n):
    s = 0
    for x in xrange(1,n/2+1):
        s += (n/x-1)*phi.totient(x)
    return s*6