# 調和數

$H_n= 1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n} =\sum_{k=1}^n \frac{1}{k}$

## 調和級數的性質

$H_{n+1} = H_{n} + \frac{1}{n+1}$

$\sum_{k=1}^n H_k = (n+1) H_n - n$

## 計算

$H_n = \int_0^1 \frac{1 - x^n}{1 - x}\,dx.$

\begin{align} H_n &= \int_0^1 \frac{1 - x^n}{1 - x}\,dx \\ &=-\int_1^0\frac{1-(1-u)^n}{u}\,du \\ &= \int_0^1\frac{1-(1-u)^n}{u}\,du \\ &= \int_0^1\left[\sum_{k=1}^n(-1)^{k-1}\binom nk u^{k-1}\right]\,du \\ &= \sum_{k=1}^n (-1)^{k-1}\binom nk \int_0^1u^{k-1}\,du \\ &= \sum_{k=1}^n(-1)^{k-1}\frac{1}{k}\binom nk . \end{align}

$H_n \sim \ln{n}+\gamma$

$H_n \sim \ln{n}+\gamma+\frac{1}{2n}-\sum_{k=1}^\infty \frac{B_{2k}}{2k n^{2k}}=\ln{n}+\gamma+\frac{1}{2n}-\frac{1}{12n^2}+\frac{1}{120n^4}-\cdots,$

### 廣義調和數

$H_\alpha = \int_0^1\frac{1-x^\alpha}{1-x}\,dx\, .$

$H_{\frac{3}{4}} = \tfrac{4}{3}-3\ln{2}+\tfrac{\pi}{2}$
$H_{\frac{2}{3}} = \tfrac{3}{2}(1-\ln{3})+\sqrt{3}\tfrac{\pi}{6}$
$H_{\frac{1}{2}} = 2 -2\ln{2}$
$H_{\frac{1}{3}} = 3-\tfrac{\pi}{2\sqrt{3}} -\tfrac{3}{2}\ln{3}$
$H_{\frac{1}{4}} = 4-\tfrac{\pi}{2} - 3\ln{2}$
$H_{\frac{1}{6}} = 6-\tfrac{\pi}{2} \sqrt{3} -2\ln{2} -\tfrac{3}{2} \ln{3}$
$H_{\frac{1}{8}} = 8-\tfrac{\pi}{2} - 4\ln{2} - \tfrac{1}{\sqrt{2}} \left\{\pi + \ln\left(2 + \sqrt{2}\right) - \ln\left(2 - \sqrt{2}\right)\right\}$
$H_{\frac{1}{12}} = 12-3\left(\ln{2}+\tfrac{\ln{3}}{2}\right)-\pi\left(1+\tfrac{\sqrt{3}}{2}\right)+2\sqrt{3}\ln \left (\sqrt{2-\sqrt{3}} \right )$

$H_{\frac{p}{q}} = \frac{q}{p} +2\sum_{k=1}^{\lfloor\frac{q-1}{2}\rfloor} \cos(\frac{2 \pi pk}{q})ln({\sin (\frac{\pi k}{q})})-\frac{\pi}{2}cot(\frac{\pi p}{q})-ln({2q})$

### 微積分

$H_{x} = x \sum_{k=1}^\infty \frac{1}{k(x+k)}\, .$

$\int_0^1H_{x}\,dx = \gamma\, ,$

$\int_0^nH_{x}\,dx = \ln{(n!)}+n\gamma\, .$

### 其他數列

$\sum_{k=1}^n \frac{1}{k} = \psi (n - 1) + \gamma$

$\sum_{k=0}^n \frac{1}{2k + 1} = \frac{1}{2} \left[\psi \left(n + \frac{3}{2}\right) + \gamma \right] + \ln{2}$

$\sum_{k=1}^n \frac{1}{2k} = \frac{H_n}{2}$