Skip to content

Commit

Permalink
feat: add a problem and zeta(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiankaima committed Sep 26, 2024
1 parent 0b821ae commit b087533
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/math/analysis/fourier.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Fourier 分析

## Parseval

### $\zeta(2)$

考虑对 $f(x) = x$ 做 Fourier:

$$
c_n = \frac{1}{2\pi} \int_{-\pi}^{\pi} x \cdot \mathrm{e}^{-i n x} \mathrm{d} x = \frac{(-1)^n}{n} i \quad \forall\ n\neq 0
$$

显然有$c_0 = 0$, 因此根据 Parseval:

$$
\sum_{n=\infty}^{\infty} |c_n|^2 = \frac{1}{2\pi} \int_{-\pi}^{\pi} x^2 \mathrm{d} x = \frac{\pi^2}{3}
$$

因此

$$
\zeta(2) = \displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}
$$
60 changes: 60 additions & 0 deletions docs/math/probability/probability.md
Original file line number Diff line number Diff line change
@@ -1 +1,61 @@
# 概率论

## Questions

### 2024-09-06 两个数互素的概率

> Also see https://math.stackexchange.com/questions/64498/probability-that-two-random-numbers-are-coprime-is-frac6-pi2
>
> 因为很有趣所以对照翻译一遍。
按照这样的思路考虑两个数互素 (_coprime_) 的概率:

- 两个数都是 $2$ 的倍数的概率:$\frac{1}{4}$.
- 两个数都是 $3$ 的倍数的概率:$\frac{1}{9}$.
- $\cdots$
- 两个数都是 $p$ 的倍数的概率:$\frac{1}{p^2}$.

所以两个数互素的概率是:

$$
\prod_{p \in \text{prime}} \left(1-\frac{1}{p^2}\right)
$$

接下来的处理方式是:

$$
\prod_{p \in \text{prime}} \left(1-\frac{1}{p^2}\right) = \left(\prod_{p \in \text{prime}}\frac{1}{1-p^{-2}} \right)^{-1}
$$

回顾

$$
\begin{aligned}
\frac{1}{1-x} &= 1 + x + x^2 + \cdots \\
\frac{1}{1-p^{-2}} &= 1 + \frac{1}{p^2} + \frac{1}{p^4} + \cdots \\
\end{aligned}
$$

因此有:

$$
\prod_{p \in \text{prime}}\frac{1}{1-p^{-2}} = (1 + \frac{1}{2^2} + \frac{1}{2^4} + \cdots)\times (1 + \frac{1}{3^2} + \frac{1}{3^4} + \cdots) \times \cdots
$$

注意到这实际上「组合」出了所有正整数,因为这样的映射是一一对应的:

$$
x = p_1^{i_1} \cdot p_2^{i_2} \cdots p_n^{i_n}
$$

其中 $p_i$ 是素数,$i_i$ 是非负整数。因此有:

$$
\prod_{p \in \text{prime}}\frac{1}{1-p^{-2}} = \sum_{n=1}^{\infty} \frac{1}{n^2} = \zeta(2) = \frac {\pi^2}{6}
$$

$\zeta(2)$ 的计算可以 [参考](/math/analysis/fourier/#zeta2), 原问题的答案是:

$$
\left(\prod_{p \in \text{prime}}\frac{1}{1-p^{-2}} \right)^{-1} = \zeta(2)^{-1} = \frac{6}{\pi^2}
$$
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ nav:
- math/index.md
- Analysis:
- math/analysis/calculus.md
- math/analysis/fourier.md
- math/analysis/functional-analysis.md
- Probability:
- math/probability/probability.md
Expand Down

0 comments on commit b087533

Please sign in to comment.