1. 程式人生 > 其它 >狄利克雷生成函式

狄利克雷生成函式

對狄利克雷卷積的深刻刻畫

對於數論函式 \(f\),我們定義其對應的狄利克雷生成函式(\(\rm DGF\))為:

\[\overline{f}(x) = \sum\limits_{i \ge 1} = \frac{f(i)}{i ^ x} \]
  • \((1)\) 狄利克雷生成函式的卷積對應數論函式狄利克雷卷積後的生成函式:
\[\overline{f}(x) \overline{g}(x) = \sum\limits_{i \ge 1, j \ge 1} \frac{f(i)g(j)}{(ij) ^ x} = \sum\limits_{i \ge 1} \frac{\sum\limits_{d \mid i} f(d)g(\frac{i}{d})}{i ^ x} = \overline{f * g}(x) \]
  • \((2)\)
    積性函式迪利克雷生成函式更本質的形式:
\[\overline{f}(x) = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_i \frac{f(p ^ i)}{p ^ {ix}}\right) \]
  • \((3)\) 常見數論函式的生成函式。

在此之前,我們先給出黎曼函式 \(\zeta(x) = \sum\limits_{i \ge 1} \frac{1}{i ^ x} = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_{i \ge 0} \frac{1}{p ^ {ix}}\right) = \prod\limits_{p \in \mathbb{P}} (1 - p ^ {-x}) ^ {-1}\)

  1. 單位函式 \(\epsilon(n)\)\(\epsilon(x) = 1\).

  2. 恆等函式 \(1(n)\)\(\overline{1}(x) = \zeta(x)\).

  3. 標誌函式 \(id(n)\)\(\overline{id}(x) = \zeta(x - 1)\)

\[\overline{id}(x) = \sum\limits_{i \ge 1} \frac{i}{i ^ x} = \sum\limits_{i \ge 1} \frac{1}{i ^ {x - 1}} = \zeta(x - 1) \]
  1. 標誌函式 \(k\) 次冪 \(id_k(n)\)\(\overline{id}(x) = \zeta(x - k)\)

    .

  2. 莫比烏斯函式 \(\mu(n)\)\(\overline{\mu}(x) = \zeta ^ {-1}(x)\).

\[\overline{\mu}(x) = \prod\limits_{p \in \mathbb{P}} (1 - p ^ {-x}) = \zeta ^ {-1}(x) \]

由此可以直觀感受得知:\(\mu * 1 = \epsilon\).

  1. 劉維爾函式 \(\lambda(n)\)\(\overline{\lambda}(x) = \zeta(2x)\zeta ^ {-1}(x)\).
\[\overline{\lambda}(x) = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_i \frac{(-1) ^ i}{p ^ {ix}}\right) = \prod\limits_{p \in \mathbb{P}} \frac{1}{1 + p ^ {-x}} =\prod\limits_{p \in \mathbb{P}}\frac{1 - p ^ {-x}}{1 - p ^ {-2x}} = \zeta(2x)\zeta ^ {-1}(x) \]

因此有 \(\lambda * 1 = \zeta(2x) = \sum\limits_{i \ge 1} \frac{1}{(i ^ 2) ^ x}= 1_{Sq}(1_{Sq}(n) = [\exist i, i ^ 2 = n])\)

根據莫比烏斯反演有:\(\lambda = \mu * 1_{Sq}\).

  1. \(f(n) = \mu ^ 2(n)\)\(\overline{f}(x) = \zeta ^ {-1}(2x)\zeta(x)\).
\[\overline{f}(x) = \prod\limits_{p \in \mathbb{P}} (1 + p ^ {-x}) = \overline{\lambda} ^ {-1}(x) = \zeta ^ {-1}(2x)\zeta(x) \]

因此有 \(\lambda\)\(\mu ^ 2\)(點積)互為逆元。

  1. 尤拉函式 \(\varphi\)\(\overline{\varphi}(x) = \zeta(x - 1)\zeta ^ {-1}(x)\).
\[\begin{aligned} \overline{\varphi}(x) &= \prod\limits_{p \in \mathbb{P}} \left(1 + (p - 1)\sum\limits_i \frac{p ^ {i}}{p ^ {(i + 1)x}}\right)\\ &= \prod\limits_{p \in \mathbb{P}} \left(1 + \frac{p - 1}{p ^ x}\sum\limits_i \frac{1}{p ^ {i(x - 1)}}\right)\\ &= \prod\limits_{p \in \mathbb{P}} \frac{p ^ x - 1}{p ^ x(1 - p ^ {1 - x})}\\ &= \prod\limits_{p \in \mathbb{P}} \frac{1 - p ^ {-x}}{1 - p ^ {1 - x}} = \zeta(x - 1)\zeta ^ {-1}(x)\\ \end{aligned} \]

因此有:\(\varphi * 1 = id\),同時由莫比烏斯反演 \(\varphi = \mu * id\).

  1. 約數個數函式 \(d(n)\)\(\overline{d}(x) = \zeta ^ 2(x)\).
\[\overline{d}(x) = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_i \frac{i + 1}{p ^ {ix}}\right) \]

\(\forall p\),令 \(S = \sum\limits_i \frac{i + 1}{p ^ {ix}}\),那麼有:

\[p ^ xS = \sum\limits_i \frac{i + 1}{p ^ {(i + 1)x}} = \sum\limits_{i \ge 1} \frac{i}{p ^ {ix}} \]

則有:\(p ^ {-x}S + \sum\limits_i \frac{1}{p ^ {ix}} = p ^ {-x}S + (1 - p ^ {-x}) ^ {-1} = S \Rightarrow S = (1 - p ^ {-x}) ^ {-2}\),那麼有:

\[\overline{d}(x) = \prod\limits_{p \in \mathbb{P}} (1 - p ^ {-x}) ^ {-2} = \zeta ^ 2(x) \]
  1. 約數 \(k\) 次方和函式 \(\sigma_k(n)\)\(\overline{\sigma_k}(x) = \zeta(x - k)\zeta(x)\)
\[\overline{\sigma_k}(x) = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_i \frac{\sum\limits_j ^ i p ^ {jk}}{p ^ {ix}}\right) = \prod\limits_{p \in \mathbb{P}} \left(\sum\limits_i \frac{1 - p ^ {(i + 1)k}}{(1 - p ^ k)p ^ {ix}}\right) = \prod\limits_{p \in \mathbb{P}} \frac{1}{1 - p ^ k}\sum\limits_i \left(\frac{1}{p ^ {ix}} - \frac{(p ^ k) ^ {i + 1}}{(p ^ x) ^ i}\right) \]

一方面,令 \(S_1 = \frac{1}{1 - p ^ k}\sum\limits_i \frac{1}{p ^ {ix}} = \frac{1}{(1 - p ^ k)(1 - p ^ {-x})}\).

另一方面,令 \(S_2 = \frac{1}{1 - p ^ k}\sum\limits_i \frac{(p ^ k) ^ {i + 1}}{(p ^ x) ^ i} = \frac{p ^ k}{(1 - p ^ k)(1 - p ^ {k - x})}\).

則有 \(S_1 - S_2 = (1 - p ^ {-x}) ^ {-1}(1 - p ^ {k - x}) ^ {-1}\),因此有:

\[\overline{\sigma_k}(x) = \prod\limits_{p \in \mathbb{P}} (1 - p ^ {-x}) ^ {-1}(1 - p ^ {k - x}) ^ {-1} = \zeta(x - k)\zeta(x) \]

由此我們可知 \(\sigma_k = id_k * 1\).

  • \((4)\) 狄利克雷生成函式基本運算
  1. 函式平移:\(\overline{f \times id_k}(x) = \sum\limits_{i \ge 1} \frac{f(i)}{i ^ {x - k}} = \overline{f}(x - k)\).

因此有:\(f * g = h \Rightarrow (f \times id_k) * (g \times id_k) = h \times id_k\).

常見的運用:\(\mu * 1 = \epsilon \Rightarrow (\mu \times id_k) * id_k = \epsilon/\varphi * 1 = id \Rightarrow (\varphi \times id_k) * id_k = id_{k + 1}\)

  1. 乘法:\(f * g = h \Rightarrow \overline{f}(x) \times \overline{g}(x) = \overline{h}(x)\).

證明在本文開始已經提及。

  1. 除法:\(f / g = f * g ^ {-1} \Rightarrow \frac{\overline{f}(x)}{\overline{g}(x)} = \overline{f * g ^ {-1}}(x)\)

  2. 求導:\(\overline{f}'(x) = \left(\sum\limits_{i \ge 1} \frac{f(i)}{i ^ x}\right)' = \sum\limits_{i \ge 1} \frac{-\ln i f(i)}{i ^ x}\).

  3. 積分:\(\int \overline{f}(x) = \int \sum\limits_{i \ge 1} \frac{f(i)}{i ^ x} = \sum\limits_{i \ge 1} \frac{-f(i)}{\ln i \times i ^ x}\).

以下部分暫時只記結論,一段時間後來補具體證明。

  1. \(\ln\)

首先 \(\ln n\)\(n\) 為正整數的時候值域為實數域,無法很好的儲存,因此使用另一個函式 \(\Omega(n)\)\(n\) 所有素因子次數和來代替,其滿足 \(\Omega(ab) = \Omega(a) + \Omega(b)\).

這樣一來求導和積分的結果就為整數了。

於是求 \(\overline{g}(x) = \ln \overline{f}(x)\) 有:\(\overline{g}'(x) = \frac{\overline{f}'(x)}{\overline{f}(x)}\),通過求導和求逆即可得到 \(\overline{g}'(x)\) 最後積分還原。

  1. \(\exp\)

\(\overline{g}(x) = \exp \overline{f}(x) \Rightarrow \ln \overline{g}(x) = \overline{f}(x) \Rightarrow \overline{f}'(x) = \frac{\overline{g}'(x)}{\overline{g}(x)} \Rightarrow \overline{g}'(x) = \overline{f}'(x)\overline{g}(x)\).

於是有等式:

\[\begin{aligned} g'(n) &= \sum\limits_{d \mid n} f'(d)g(\frac{n}{d})\\ &= \sum\limits_{d \mid n} -\ln d \cdot f(d)g(\frac{n}{d})\\ &= -\ln 1 f(1)g(n) + \sum\limits_{d \mid n, d \ne 1} -\ln d \cdot f(d)g(\frac{n}{d})\\ &= \sum\limits_{d \mid n, d \ne 1} -\ln d \cdot f(d)g(\frac{n}{d})\\ \end{aligned} \]

另一方面:\(g'(n) = -\ln n \cdot g(n)\) 那麼就可以得到遞推式:\(g(n) = \frac{1}{\ln n}\sum\limits_{d \mid n, d \ne 1} \ln d \cdot f(d)g(\frac{n}{d})\).

GO!