其他分享
首页 > 其他分享> > Luogu1829 [国家集训队]Crash的数字表格 / JZPTAB

Luogu1829 [国家集训队]Crash的数字表格 / JZPTAB

作者:互联网

https://www.luogu.com.cn/problem/P1829

莫比乌斯反演

\[令n\le m \\ \sum_{i=1}^n\sum_{j=1}^m lcm(i,j)\\ =\sum_{k=1}^n \sum_{i=1}^{\lfloor \frac{n}{k} \rfloor} \sum_{j=1}^{\lfloor \frac{m}{k} \rfloor} ijk[\gcd(i,j)=1]\\ =\sum_{k=1}^n k \sum_{i=1}^{\lfloor \frac{n}{k} \rfloor} \sum_{j=1}^{\lfloor \frac{m}{k} \rfloor} ij \sum_{d|i,d|j}\mu(d)\\ =\sum_{k=1}^n k \sum_{d=1}^{\lfloor \frac{n}{k} \rfloor} \mu(d)d^2 \sum_{i=1}^{\lfloor \frac{n}{kd} \rfloor}\sum_{j=1}^{\lfloor \frac{m}{kd} \rfloor}ij\\ 令q=kd\\ =\sum_{q=1}^n \sum_{k|q}k \mu(\frac{q}{k}) \sum_{i=1}^{\lfloor \frac{n}{q} \rfloor}\sum_{j=1}^{\lfloor \frac{m}{q} \rfloor}ij (?)\\ \]

标签:lfloor,frac,Luogu1829,JZPTAB,sum,kd,rfloor,ij,Crash
来源: https://www.cnblogs.com/GK0328/p/13358603.html