\(\prod \limits_{i=1}^{n}\prod\limits_{j=1}^{m}f[gcd(i,j)]\)
\(\prod\limits_{k=1}^{n}f[k]^{\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{m}[gcd(i,j)==k]}\)
幂我们很熟悉
就是
\(g(x)=\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{m}[gcd(i,j)==x]=\sum\limits_{i=1}^{\frac{n}{x}}\sum\limits_{j=1}^{\frac{m}{x}}[gcd(i,j)==1]\)
\(f(x)=\sum\limits_{x|d}^ng(d)=\frac{n}{x}\frac{m}{x}\)
\(g(x)=\sum\limits_{x|d}^n\mu(\frac{d}{x})f(d)\)
\(g(x)=\sum\limits_{x|d}^n\mu(\frac{d}{x})\frac{n}{d}\frac{m}{d}\)
\(g(x)=\sum\limits_{d=1}^{n/x}\mu(d)\frac{n}{xd}\frac{m}{xd}\)
带回去
\(\prod\limits_{k=1}^{n}f[k]^{\sum\limits_{d=1}^{n/k}\mu(d)\frac{n}{dk}\frac{m}{dk}}\)
令i=d*k
\(\prod\limits_{k=1}^{n}f[k]^{\sum\limits_{k|i}^{n}\mu(i/k)\frac{n}{i}\frac{m}{i}}\)
\(\prod\limits_{k=1}^{n}\prod\limits_{k|i}^{n}f[k]^{\mu(i/k)\frac{n}{i}\frac{m}{i}}\)
\(\prod\limits_{i=1}^{n}\prod\limits_{k|i}^{n}f[k]^{\mu(i/k)\frac{n}{i}\frac{m}{i}}\)
设\(Au(i)=\prod\limits_{k|i}^{n}f[k]^{\mu(i/k)}\)
\(ans=\prod\limits_{i=1}^{n}Au(i)^{\frac{n}{i}\frac{m}{i}}\)
原文地址:https://www.cnblogs.com/dsrdsr/p/10383037.html