SDOI2017数字表格

求$\prod_{i=1}^n\prod_{j=1}^n\text{Fib}[\gcd(i,j)]\;\text{mod}\;10^9+7$的值
令$n\leq m$,则有:

\begin{aligned}
\prod_{i=1}^n\prod_{j=1}^nf[\gcd(i,j)]
&=\prod_{d=1}^n\prod_{i=1}^\frac nd\prod_{j=1}^\frac md\text{Fib}[d]^{[\gcd(i,j)=1]}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^n\sum_{j=1}^m[\gcd(i,j)=d]}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^{\left\lfloor\frac nk\right\rfloor}\sum_{j=1}^{\left\lfloor\frac mk\right\rfloor}\sum_{k|\gcd(i,j)}\mu(k)}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^{\left\lfloor\frac nk\right\rfloor}\sum_{j=1}^{\left\lfloor\frac mk\right\rfloor}\sum_{k|i}\sum_{k|j}\mu(k)}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^{\left\lfloor\frac nk\right\rfloor}\sum_{k|i}\sum_{j=1}^{\left\lfloor\frac mk\right\rfloor}\sum_{k|j}\mu(k)}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^{\min\left(\left\lfloor\frac nk\right\rfloor,\left\lfloor\frac mk\right\rfloor\right)}\mu(k)\sum_{i=1}^{\left\lfloor\frac nk\right\rfloor}\sum_{k|i}\sum_{j=1}^{\left\lfloor\frac mk\right\rfloor}\sum_{k|j}1}\\
&=\prod_{d=1}^n\text{Fib}[d]^{\sum_{i=1}^{\min\left(\left\lfloor\frac nk\right\rfloor,\left\lfloor\frac mk\right\rfloor\right)}\mu(k)\sum_{i=1}^{\left\lfloor\frac nk\right\rfloor}\sum_{k|i}1\sum_{j=1}^{\left\lfloor\frac mk\right\rfloor}\sum_{k|j}1}\\
\end{aligned}

...To be continue.

posted @ 2017-09-23 22:01  baka  阅读(344)  评论(0编辑  收藏  举报