莫比乌斯函数瞎搞

已知

\[F(n)=\sum\limits_{d\mid n}f(d) \]

\[\sum\limits_{d\mid n}\mu(d)\times F(\dfrac{n}{d})=\sum\limits_{d\mid n}\mu(d)\sum\limits_{d'\mid\dfrac{n}{d}}F(d') \]

\(考虑d,d',d*d'始终为n,所以求和可以互换\)

\[\sum\limits_{d\mid n}\mu(d)\sum\limits_{d'\mid\dfrac{n}{d}}f(d')=\sum\limits_{d\mid n}f(d)\sum\limits_{d'\mid\dfrac{n}{d}}\mu(d')=\sum\limits_{d\mid n}f(d)[\dfrac{n}{d}=1]=\sum\limits_{d\mid n}f(d)[d=n]=f(n) \]


\(求\)

\[\sum\limits_{prime}\sum_{d}^{min(\dfrac{n}{prime},\dfrac{m}{prime})}\mu(d)\times\dfrac{n}{prime\times d}\times\dfrac{m}{prime\times d} \]

\(考虑prime\times d,令T=prime\times d\)

\(原式可化为\)

\[\sum\limits_{T}\dfrac{n}{T}\times\dfrac{m}{T}\times\sum\limits_{prime\mid T}{\mu(\dfrac{T}{prime})} \]

\(考虑f(T)=\sum\limits_{prime\mid T}{\mu(\dfrac{T}{prime})}\)

\((1)T=p_1p_2.....p_k,此时f(T)=(-1)^{k-1}k\)

\((2)T=p_1p_2..p_j^{2}..p_k,此时f(T)=(-1)^{k}\)

\((3)0\)

\(因此可筛出f\)


\(关于\)

\[\lfloor\dfrac{\lfloor\dfrac{n}{x}\rfloor}{y}\rfloor=\lfloor\dfrac{n}{xy}\rfloor \]

\(设n=k_1x+r_1,r1<x\)

\(设k_1=k_2y+r_2,r_2<y\)

\[\lfloor\dfrac{\lfloor\dfrac{n}{x}\rfloor}{y}\rfloor=k2 \]

\[\lfloor\dfrac{n}{xy}\rfloor=\lfloor\dfrac{k_1x+r_1}{xy}\rfloor=\lfloor\dfrac{(k_2y+r_2)x+r_1}{xy}\rfloor=\lfloor\dfrac{k_2xy+r_2x+r_1}{xy}\rfloor=k2+\lfloor\dfrac{r_2x+r_1}{xy}\rfloor \]

\(r_2x+r_1<xy\)

\[\therefore\lfloor\dfrac{\lfloor\dfrac{n}{x}\rfloor}{y}\rfloor=\lfloor\dfrac{n}{xy}\rfloor \]


\[f*f'(n)=\sum\limits_{d\mid n}f(d)\times f'(\dfrac{n}{d})=E(n) \]

\[E(n)=f(1)f'(n)+\sum\limits_{d\mid n且d\neq 1}f(d)\times f'(\dfrac{n}{d}) \]

\[f'(1)=\dfrac{1}{f(1)} \]

\[f'(n)=\dfrac{\sum\limits_{d\mid n且d\neq n}f(\dfrac{n}{d})\times f'(d)}{-f(1)} \]


\[\sum\limits_{i=1}^n\sum\limits_{j=1}^m\gcd(i,j)^k \]

\[\sum\limits_{p}p^k\sum\limits_{i=1}^n\sum\limits_{j=1}^m[\gcd(i,j)==p] \]

\[\sum\limits_pp^k\sum\limits_d\lfloor\dfrac{n}{dp}\rfloor\lfloor\dfrac{m}{dp}\rfloor\mu(d) \]

\[\sum_{T}\lfloor\dfrac{n}{T}\rfloor\lfloor\dfrac{m}{T}\rfloor\sum_{p\mid T}p^k\mu(\dfrac{T}{p}) \]

\[令F(n)=\sum_{p\mid T}p^k\mu(\dfrac{T}{p}),积性 \]

\[令n=p_1^{x_i}....p_k^{x_k},F(n)=\prod F(p_i^{x_i}) \]

\[F(p_i^{x_i})=p_i^{x_ik}-p_i^{x_ik-k}=p_i^{x_ik-k}(p_i^k-1) \]

\[F(p_i^{x_i-1})=p_i^{x_ik-k-k}(p_i^k-1) \]

\[F(p_i^{x_i})=F(p_i^{x_i-1}) \]


\[\sum\sum lcm(i,j)=\sum\sum \dfrac{ij}{\gcd(i,j)}=\sum\limits_{k}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{m}\dfrac{ij}{k}[gcd(i,j)=k] \]

\[=\sum\limits_{k}\sum\limits_{i=1}^{\dfrac{n}{k}}\sum\limits_{j=1}^{\dfrac{m}{k}}ijk[gcd(i,j)=1]=\sum\limits_{k}k\sum\limits_{i=1}^{\dfrac{n}{k}}\sum\limits_{j=1}^{\dfrac{m}{k}}ij\sum_{d\mid i且d\mid j}\mu(d) \]

\[=\sum\limits_{k}k\sum_{d}\mu(d)\sum\limits_{i=1且d\mid i}^{\dfrac{n}{k}}\sum\limits_{j=1且d\mid j}^{\dfrac{m}{k}}ij=\sum\limits_{k}k\sum_{d}\mu(d)d^2\sum\limits_{i=1}^{\dfrac{n}{dk}}\sum\limits_{j=1}^{\dfrac{m}{dk}}ij \]

\[=\sum\limits_{k}k\sum_{d}\mu(d)d^2\dfrac{(1+\lfloor\dfrac{n}{dk}\rfloor)\lfloor\dfrac{n}{dk}\rfloor}{2}\times\dfrac{(1+\lfloor\dfrac{m}{dk}\rfloor)\lfloor\dfrac{m}{dk}\rfloor}{2} \]

\[令T=dk,=\sum\limits_{T}\dfrac{(1+\lfloor\dfrac{n}{T}\rfloor)\lfloor\dfrac{n}{T}\rfloor}{2}\times\dfrac{(1+\lfloor\dfrac{m}{T}\rfloor)\lfloor\dfrac{m}{T}\rfloor}{2}\sum\limits_{d\mid T}\dfrac{T}{d}d^2\mu(d)= \]

\[\sum\limits_{T}\dfrac{(1+\lfloor\dfrac{n}{T}\rfloor)\lfloor\dfrac{n}{T}\rfloor}{2}\times\dfrac{(1+\lfloor\dfrac{m}{T}\rfloor)\lfloor\dfrac{m}{T}\rfloor}{2}\sum\limits_{d\mid T}T\times d\times \mu(d) \]

\[令f(T)=\sum\limits_{d\mid T}T\times d\times \mu(d),积性 \]

\[f(p^{k+1})=f(p^{k})=1-p(k>=1) \]


\[f_0(n)=\sum\limits_{d\mid n}[gcd(d,\dfrac{n}{d})=1]=\sum\limits_{d\mid n}\sum\limits_{d'\mid d且d'\mid \dfrac{n}{d}}\mu(d') \]

\[\sum\limits_{d|n}\mu(d)\sum\limits_{d\mid d'且d\mid \dfrac{n}{d'}}1 \]

\[f_k(n)=\sum\limits_{d\mid n}\dfrac{f_{k-1}(d)+f_{k-1}(\dfrac{n}{d})}{2}=\sum\limits_{d|n}f_{k-1}(d)=\sum\limits_{d|n}f_{k-1}*1(d) \]

\[f_k=f_0*(1)^k \]

\[f是积性函数 \\ f_r(p^k)=\sum\limits_{d\mid p^k}f_{r-1}(d) \]


\[\sum\limits_{i=1}^n\sum\limits_{j=1}^m\sum\limits_{d\mid gcd(i,j)}^ad(a的限制不是这个) \]

\[\sum\limits_{d}^{a}d\lfloor\dfrac{n}{d}\rfloor\lfloor\dfrac{m}{d}\rfloor(错误解法) \]


\[\sum_{lynb} \]


\[\sum\limits_{i=1}^n\sum\limits_{j=1}^m\sigma(gcd(i,j))[\sigma(gcd(i,j))\leq a] \\ \sum\limits_{d}[\sigma(d)\leq a]\sigma(d)\sum\limits_{i=1}^n\sum\limits_{j=1}^m[gcd(i,j)=d] \\ \sum\limits_{d}[\sigma(d)\leq a]\sigma(d)\sum\limits_{i=1}^{\dfrac{n}{d}}\sum\limits_{j=1}^{\dfrac{m}{d}}[gcd(i,j)=1] \\ \sum\limits_{p}[\sigma(p)\leq a]\sigma(p)\sum\limits_{d}\mu(d)\lfloor\dfrac{n}{dp}\rfloor\lfloor\dfrac{m}{dp}\rfloor \\ \sum\limits_{T}\lfloor\dfrac{n}{T}\rfloor\lfloor\dfrac{m}{T}\rfloor\sum\limits_{p\mid T}[\sigma(p)\leq a]\sigma(p)\mu(\dfrac{T}{p}) \]

\[令f(T)=\sum\limits_{p\mid T}[\sigma(p)\leq a]\sigma(p)\mu(\dfrac{T}{p}) \]

\(对a排序,用BIT对于每一个p动态插入,均摊\)


\[ \]


\[\sum\limits_{i=1}^n\sum\limits_{j=1}^md(ij)=\sum\limits_{i=1}^n\sum\limits_{j=1}^md(ij) \]

\[d(xy)=\sum\limits_{d\mid xy}1 \]

\[d(xy)=\sum\limits_{i\mid x}\sum\limits_{j\mid y}[\gcd(i,j)=1] \]

\[\sum\limits_{i=1}^n\sum\limits_{j=1}^md(ij)=\sum\limits_{i=1}^n\sum\limits_{j=1}^m\sum\limits_{x\mid i}\sum\limits_{y\mid j}\sum\limits_{d\mid x且d\mid y}\mu(d) \]

\[=\sum\limits_{d}\mu(d)\sum\limits_{d\mid x}\lfloor\dfrac{n}{x}\rfloor\sum\limits_{d\mid y}\lfloor\dfrac{m}{y}\rfloor \]

\[=\sum\limits_{d}\mu(d)\sum\limits_{x=1}\lfloor\dfrac{n}{xd}\rfloor\sum\limits_{y=1}\lfloor\dfrac{m}{yd}\rfloor \]

\[令f(n)=\sum\limits_{d=1}\lfloor\dfrac{n}{d}\rfloor \]

\[=\sum\limits_{d}\mu(d)f(\dfrac{n}{d})*f(\dfrac{m}{d}) \]

\[S(n)=\sum\limits_{i=1}^nf(i) \\ 设h(n)=f*h(n)=\sum\limits_{d}f(\lfloor\dfrac{n}{d}\rfloor)g(d) \\ \sum\limits_{i=1}^nh(n)=\sum\limits_{i=1}^n\sum\limits_{d}f(\lfloor\dfrac{i}{d}\rfloor)g(d)=\sum\limits_{d=1}^ng(d)\sum\limits_{k=1}^{\lfloor\dfrac{n}{d}\rfloor}f(k)=\sum\limits_{d=1}^ng(d)S(\lfloor\dfrac{n}{d}\rfloor) \\ =S(n)g(1)+\sum\limits_{d=2}^ng(d)S(\lfloor\dfrac{n}{d}\rfloor)=\sum\limits_{i=1}^nh(n) \\ S(n)=\dfrac{\sum\limits_{i=1}^nh(n)-\sum\limits_{d=2}^ng(d)S(\lfloor\dfrac{n}{d}\rfloor)}{g(1)} \]

\[求\sum\limits_{i=1}^{n}\mu(i) \\ g(i)=1,h(i)=E(i)=[i==1] \]


\[求\sum\limits_{i=1}^{n}\phi(i) \\ g(i)=1,h(i)=i \]


\[f(n)=i\times \phi(i) \\ \sum\limits_{i=1}^nf(i) \\ 考虑h(n)=\sum\limits_{d\mid n}d\times\phi(d)=\sum\limits_{d\mid n}\phi(d)\sum\limits_{d'\mid d}\phi(d')=\sum\limits_{d\mid n}\phi(d)\sum\limits_{i=1}^{\dfrac{n}{d}}\phi(id) \\ =\sum\limits_{d\mid n}\phi(d)\times d\times g(\dfrac{n}{d}) \\ 令g(i)=i,所以h(i)=i^2 \\ \sum\limits_{i=1}^nh(i)=\dfrac{n(n+1)(2n+1)}{6} \]


\[\sum\limits_{d\mid n}f(d)=n^2-3n+2 \\ h(n)=g*f(n)=\sum\limits_{d\mid n}f(d)g(\dfrac{n}{d}) \\ g(i)=1,h(i)=i^2-3*i+2 \\ \sum_{i=1}^nh(i)=\dfrac{n(n+1)(2n+1)}{6}-3*(\dfrac{n(n+1)}{2})+2n \\ 设F(n)=\sum\limits_{d\mid n}f(d)=n^2-3n+2 \\ f(n)=\sum_{d\mid n}F(d)\mu(\dfrac{n}{d}) \]


\[\sum_{i=1}^n\sum_{j=1}^i\dfrac{i\times j}{i\times gcd(i,j)} \\ \sum_{i=1}^n\sum_{j=1}^i\dfrac{j}{gcd(i,j)} \\ \sum_{i=1}^n\sum_{j=1}^i\dfrac{j}{gcd(i,j)}=\sum_{k}\dfrac{\sum_{i=1}^{\dfrac{n}{k}}\sum_{j=1}^{\dfrac{i}{k}}jk\sum_{d\mid gcd(i,j)}\mu(d)}{k} \\ =\sum_{k}\sum_{i=1}^{\dfrac{n}{k}}\sum_{j=1}^{\dfrac{i}{k}}j\sum_{d\mid gcd(i,j)}\mu(d)=\sum_{k}\sum_{d}d\mu(d)\sum_{i=1}^{\dfrac{n}{kd}}\sum_{j=1}^{\dfrac{i}{kd}}j=\sum_{k}\sum_{d}d\mu(d)\sum_{i=1}^{\dfrac{n}{kd}}(\dfrac{\lfloor\dfrac{i}{kd}\rfloor(1+\lfloor\dfrac{i}{kd}\rfloor)}{2}) \\ 设f(n)=\sum_{j=1}^n\dfrac{j}{gcd(n,j)}=\sum_{k}\sum_{d}d\mu(d)(1+\dfrac{\lfloor\dfrac{i}{kd}\rfloor(1+\lfloor\dfrac{i}{kd}\rfloor)}{2})=\sum_{d\mid n}\sum_{j=1}^{\lfloor\dfrac{n}{d}\rfloor}j[gcd(\dfrac{n}{d},j)=1] \\ =\dfrac{\sum\limits_{d\mid n}\lfloor\dfrac{n}{d}\rfloor\times\phi(\lfloor\dfrac{n}{d}\rfloor)+1}{2} \\ \sum_{i=1}^nf(i)=\dfrac{(\sum_{i=1}^n\sum_{d\mid i}\lfloor\dfrac{i}{d}\rfloor\times\phi(\lfloor\dfrac{i}{d}\rfloor))+n}{2}=\dfrac{\sum_{d=1}^{n}\sum_{k=1}^{\dfrac{n}{d}}k\times \phi(k)+n}{2} \\ 令P(n)=\sum_{i=1}^ni\times\phi(i) \\ 原式=\dfrac{\sum_{d=1}^nP(\dfrac{n}{d})+n}{2} \\ 对于P(i)可以用杜教筛,同时可以求出\sum f \]

posted @ 2022-02-10 21:40  kid_magic  阅读(35)  评论(0编辑  收藏  举报