設 \((i,j)=gcd(i,j)\)
\[f_{i}=f_{i-1}+f_{i-2}
\]
\[f_{i}=f_{i-2}\times f_{1}+f_{i-1}\times f_{2}
\]
\[f_{i}=f_{i-1}\times f_{2}+f_{i-2}\times f_{1}
\]
\[f_{i}=(f_{i-3}+f_{i-2})\times f_{2}+f_{i-2}\times f_{1}
\]
\[f_{i}=f_{i-3}\times f_{2}+f_{i-2}\times f_{3}
\]
\[f_{i}=f_{i-k}\times f_{k-1}+F_{i-k+1}\times f_{k}
\]
\[f_{n+m}=f_{n-1}\times f_{m}+f_{n}\times f_{m+1}
\]
\[(f_{1},f_{2})=(f_{2},f_{3})=(f_{i},f_{i-1})=(f_{i}-f_{i-1},f_{i-1})=(f_{i-2},f_{i-1})=1
\]
\[f_{(i,j)}=(f_{i},f_{j})\rightarrow f_{j}\mid f_{i}=j\mid i
\]
因為 \(f_{2}=1\),則 \(f_{2}\mid 2x+1(x\in Z)\),但 \(2\nmid 2x+1 (x\in Z)\),故上述式子存在特例,且該特例唯一.
一
設 \(tot(i)\) 是 \(i\) 的約數的個數,將 \(i\) 用唯一分解定理分解為
\[i=\prod\limits_{i}p_{i}^{c_{i}}
\]
則有
\[tot(i)=\prod(c_{i}+1)
\]
那麼
\[tot(i\times j)=\prod\limits_{i}p_{i}^{c_{i}}\times \prod\limits_{j}p_{j}^{c_{j}}=tot(i)\times tot(j)
\]
即 \(tot(x)\) 為 積性函式.
若質數 \(p\mid i\),則 \(min_{j}[j\mid (i\times p)]=p\),且 \(c_{p_{i}}=2\)
若質數 \(p\) 是 \(i\times p\) 的最小因子,不妨設
\[i=p^{c_{p}}\times\prod\limits_{i}p_{i}^{c_{p_{i}}}
\]
\[tot(i)=c_{p}\times \prod\limits_{i}c_{p_{i}}
\]
則
\[i\times p=p^{c_{p}+1}\times\prod\limits_{i}p_{i}^{c_{p_{i}}}
\]
\[tot(i\times p)=(c_{p}+1)\times \prod\limits_{i}c_{p_{i}}
\]
則
\[tot(i\times p)=\frac{tot(i)}{c_{p}}\times (c_{p}+1)
\]
所以我們引入 \(mintimes(i)\) 表示 \(i\) 的最小約數的 \(c_{i}\).
上述式子可以表示成7uyhj
\[tot(i\times p)=\frac{tot(i)}{mintimes(i)}\times (mintimes(i)+1)
\]
上述推論對全部 \(p\in p_{i}\) 均成立
二
設 \(sqrtot(i)\) 為 \(i\) 的約數的平方和,與 \(tot(i)\) 類似,可得
\[sqrtot(x)=\prod_{i}\ \sum_{j=0}^{c_{i}}(p_{i}^{j})^{2}
\]
\[sqrtot(i\times j)=\prod_{i}\ \sum_{j=0}^{c_{i}}(p_{i}^{j})^{2}\times \prod_{i'}\ \sum_{j'=0}^{c_{i'}}(p_{i'}^{j'})^{2}=sqrtot(i)\times sqrtot(j)
\]
所以 \(sqrtot(x)\) 也為積性函式
同理,不妨設
\[p_{sum}=\sum_{j=0}^{c_{p_{i}}}(p^{j})^{2}
\]
\[sqrtot(i)=p_{sum}\times \prod_{i}\ \sum_{j=0}^{c_{i}}(p_{i}^{j})^{2}
\]
則
\[sqrtot(i\times p)=(p^{2}\times p_{sum}+1)\times \prod_{i}\ \sum_{j=0}^{c_{i}}(p_{i}^{j})^{2}
\]
維護 \(expmin(i)=p_{sum}\) 即可.