∑
i
=
1
d
i
[
g
c
d
(
i
,
d
)
=
=
1
]
=
ϕ
(
d
)
∗
d
2
\sum_{i=1}^{d}i[gcd(i,d)==1]=\frac{\phi(d)*d}{2}
∑i=1di[gcd(i,d)==1]=2ϕ(d)∗d
表示[1,d]中与d互质的数的和