P3768简单的数学题(莫比乌斯,欧拉函数,杜教筛)

Posted H-w-H

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了P3768简单的数学题(莫比乌斯,欧拉函数,杜教筛)相关的知识,希望对你有一定的参考价值。

P3768简单的数学题

解法一:

推式子部分

∑ i = 1 n ∑ j = 1 n i j g c d ( i , j ) ∑ i = 1 n i ∑ j = 1 n j ∑ d ∣ i , d ∣ j d [ g c d ( i , j ) = d ] ∑ d = 1 n d 3 s u m i = 1 n d i ∑ j = 1 n d j [ g c d ( i , j ) = 1 ] ∑ d = 1 n d 3 ∑ i = 1 n d i ∑ j = 1 n d j ∑ x ∣ g c d ( i , j ) μ ( x ) ∑ d = 1 n d 3 ∑ x = 1 n d x 2 μ ( x ) ∑ i = 1 n d x i ∑ j = 1 n d x j ∑ d = 1 n d 3 ∑ x = 1 n d x 2 μ ( x ) ( ⌊ n d x ⌋ ( 1 + ⌊ n d x ⌋ ) 2 ) 2 令 t = d x ∑ t = 1 n t 2 ∑ d ∣ t μ ( t d ) d ∗ S u m 2 ( n t ) ∑ t = 1 n t 2 ϕ ( t ) ∗ S u m 2 ( n t ) \\begin{aligned} &\\sum_{i=1}^n\\sum_{j=1}^nijgcd(i,j)\\\\ &\\sum_{i=1}^ni\\sum_{j=1}^nj\\sum_{d|i,d|j}d[gcd(i,j)=d]\\\\ &\\sum_{d=1}^nd^3sum_{i=1}^{\\frac nd}i\\sum_{j=1}^{\\frac nd}j[gcd(i,j)=1]\\\\ &\\sum_{d=1}^nd^3\\sum_{i=1}^{\\frac nd}i\\sum_{j=1}^{\\frac nd}j\\sum_{x|gcd(i,j)}\\mu(x)\\\\ &\\sum_{d=1}^nd^3\\sum_{x=1}^{\\frac nd}x^2\\mu(x)\\sum_{i=1}^{\\frac{n}{dx}}i\\sum_{j=1}^{\\frac{n}{dx}}j\\\\ &\\sum_{d=1}^nd^3\\sum_{x=1}^{\\frac nd}x^2\\mu(x)\\left( \\frac{\\lfloor \\frac{n}{dx}\\rfloor(1+\\lfloor \\frac{n}{dx}\\rfloor)}{2}\\right)^2\\\\ &令t=dx\\\\ &\\sum_{t=1}^nt^2\\sum_{d|t}\\mu(\\frac td)d*Sum^2(\\frac nt)\\\\ &\\sum_{t=1}^nt^2\\phi(t)*Sum^2(\\frac nt)\\\\ &\\end{aligned} i=1nj=1nijgcd(i,j)i=1nij=1njdi,djd[gcd(i,j)=d]d=1nd3sumi=1dnij=1dnj[gcd(i,j)=1]d=1nd3i=1dnij=1dnjxgcd(i,j)μ(x)d=1nd3x=1dnx2μ(x)i=1dxnij=1dxnjd=1nd3x=1dnx2μ(x)(2dxn(1+dxn))2t=dxt=1nt2dtμ(dt)dSum2(tn)t=1nt2ϕ(t)Sum2(tn以上是关于P3768简单的数学题(莫比乌斯,欧拉函数,杜教筛)的主要内容,如果未能解决你的问题,请参考以下文章

数论入门——莫比乌斯函数,欧拉函数,狄利克雷卷积,线性筛,莫比乌斯反演,杜教筛

莫比乌斯反演欧拉函数杜教筛大总结

51nod-1239&1244欧拉函数之和&莫比乌斯函数之和 杜教筛

bzoj 4916: 神犇和蒟蒻欧拉函数+莫比乌斯函数+杜教筛

bzoj 3512: DZY Loves Math IV欧拉函数+莫比乌斯函数+杜教筛

Luogu3768简单的数学题(莫比乌斯反演,杜教筛)