标签:class inline lin 证明 arp span 否则 rac lock
\(S(n,m)=\{k|n\%k+m\%k\ge k,k\in Z\}\),给定\(n,m\),求\(\varphi(n)*\varphi(m)*\sum\limits_{k\in S(n,m)}\varphi(k)\)(\(n,m\le 10^{15}\))
结论:\(\sum\limits_{k\in S(n,m)}\varphi(k)=n*m\)
证明:
对于\(k\in Z\)
\(n=q_1k+r_1,m=q_2k+r_2\)
若\(r1+r2\ge k\),\(\left\lfloor\frac{n+m}{k}\right\rfloor-\left\lfloor\frac{n}{k}\right\rfloor-\left\lfloor\frac{m}{k}\right\rfloor=1\)
否则,\(\left\lfloor\frac{n+m}{k}\right\rfloor-\left\lfloor\frac{n}{k}\right\rfloor-\left\lfloor\frac{m}{k}\right\rfloor=0\)
故把原式等价得写为\(\sum\limits_{k=1}^{n+m}\varphi(k)\left\lfloor\frac{n+m}{k}\right\rfloor-\sum\limits_{k=1}^{n}\varphi(k)\left\lfloor\frac{n}{k}\right\rfloor-\sum\limits_{k=1}^{m}\varphi(k)\left\lfloor\frac{m}{k}\right\rfloor\)
因为\(\sum\limits_{d|n}\varphi(d)=n\)
故化为\(\sum\limits_{k=1}^{n+m}k-\sum\limits_{k=1}^{n}k-\sum\limits_{k=1}^{m}k\)
标签:class inline lin 证明 arp span 否则 rac lock
原文地址:https://www.cnblogs.com/Grice/p/12604029.html