調和數

調和數可以指跟約數和有關的整數歐爾調和數。在數學上，第n個調和數是首n個正整數的倒數和，即 H n = 1 + 1 2 + 1 3 + ⋯ + 1 n = ∑ k = 1 n 1 k {\displaystyle H_{n}=1+{\frac {1}{2}}+{\frac {1}{3}}+\cdots +{\frac {1}{n}}=\sum _{k=1}^{n}{\frac {1}{k}}} 它也等于这些自然数的调和平均值的倒数的 n {\displaystyle n} 倍。它可以推廣到正整數的倒數的冪之和，即 H n ( m ) = ∑ k = 1 n 1 k m {\displaystyle H_{n}^{(m)}=\sum _{k=1}^{n}{\frac {1}{k^{m}}}} 。 根據定義，調和數滿足遞推關係 H n + 1 = H n + 1 n + 1 {\displaystyle H_{n+1}=H_{n}+{\frac {1}{n+1}}} 它也滿足恆等式 ∑ k = 1 n H k = ( n + 1 ) H n − n {\displaystyle \sum _{k=1}^{n}H_{k}=(n+1)H_{n}-n} 對於第n項調和數，有以下公式 H n = ∫ 0 1 1 − x n 1 − x d x . {\displaystyle H_{n}=\int _{0}^{1}{\frac {1-x^{n}}{1-x}}\,dx.} 設: x = 1 − u {\displaystyle x=1-u\,\!} ，由此得到 H n = ∫ 0 1 1 − x n 1 − x d x = − ∫ 1 0 1 − ( 1 − u ) n u d u = ∫ 0 1 1 − ( 1 − u ) n u d u = ∫ 0 1 [ ∑ k = 1 n ( − 1 ) k − 1 ( n k ) u k − 1 ] d u = ∑ k = 1 n ( − 1 ) k − 1 ( n k ) ∫ 0 1 u k − 1 d u = ∑ k = 1 n ( − 1 ) k − 1 1 k ( n k ) . {\displaystyle {\begin{aligned}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 {n}{k}}u^{k-1}\right]\,du\\&=\sum _{k=1}^{n}(-1)^{k-1}{\binom {n}{k}}\int _{0}^{1}u^{k-1}\,du\\&=\sum _{k=1}^{n}(-1)^{k-1}{\frac {1}{k}}{\binom {n}{k}}.\end{aligned}}} 對於調和數 H n {\displaystyle H_{n}} ，當n不是太大時，可以直接計算。 當n特別大時，可以進行估算。 因為 lim n → ∞ ( ∑ k = 1 n 1 k − ln ⁡ n ) = γ {\displaystyle \lim _{n\to \infty }\left(\sum _{k=1}^{n}{\frac {1}{k}}-\ln n\right)=\gamma } ， 其中 γ ≈ 0.5772156649 {\displaystyle \gamma \approx 0.5772156649} 称为欧拉-马斯刻若尼常数， 由此得到 H n ∼ ln ⁡ n + γ {\displaystyle H_{n}\sim \ln {n}+\gamma } 當n越大時，估算越精確。 更精確的估算是 H n ∼ ln ⁡ n + γ + 1 2 n − ∑ k = 1 ∞ B 2 k 2 k n 2 k = ln ⁡ n + γ + 1 2 n − 1 12 n 2 + 1 120 n 4 − ⋯ , {\displaystyle H_{n}\sim \ln {n}+\gamma +{\frac {1}{2n}}-\sum _{k=1}^{\infty }{\frac {B_{2k}}{2kn^{2k}}}=\ln {n}+\gamma +{\frac {1}{2n}}-{\frac {1}{12n^{2}}}+{\frac {1}{120n^{4}}}-\cdots ,} 其中 B k {\displaystyle B_{k}} 是第k項伯努利數。 廣義調和數滿足 H α = ∫ 0 1 1 − x α 1 − x d x . {\displaystyle H_{\alpha }=\int _{0}^{1}{\frac {1-x^{\alpha }}{1-x}}\,dx\,.} 由此，我們得到 H 3 4 = 4 3 − 3 ln ⁡ 2 + π 2 {\displaystyle H_{\frac {3}{4}}={\tfrac {4}{3}}-3\ln {2}+{\tfrac {\pi }{2}}} H 2 3 = 3 2 ( 1 − ln ⁡ 3 ) + 3 π 6 {\displaystyle H_{\frac {2}{3}}={\tfrac {3}{2}}(1-\ln {3})+{\sqrt {3}}{\tfrac {\pi }{6}}} H 1 2 = 2 − 2 ln ⁡ 2 {\displaystyle H_{\frac {1}{2}}=2-2\ln {2}} H 1 3 = 3 − π 2 3 − 3 2 ln ⁡ 3 {\displaystyle H_{\frac {1}{3}}=3-{\tfrac {\pi }{2{\sqrt {3}}}}-{\tfrac {3}{2}}\ln {3}} H 1 4 = 4 − π 2 − 3 ln ⁡ 2 {\displaystyle H_{\frac {1}{4}}=4-{\tfrac {\pi }{2}}-3\ln {2}} H 1 6 = 6 − π 2 3 − 2 ln ⁡ 2 − 3 2 ln ⁡ 3 {\displaystyle H_{\frac {1}{6}}=6-{\tfrac {\pi }{2}}{\sqrt {3}}-2\ln {2}-{\tfrac {3}{2}}\ln {3}} H 1 8 = 8 − π 2 − 4 ln ⁡ 2 − 1 2 { π + ln ⁡ ( 2 + 2 ) − ln ⁡ ( 2 − 2 ) } {\displaystyle 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 1 12 = 12 − 3 ( ln ⁡ 2 + ln ⁡ 3 2 ) − π ( 1 + 3 2 ) + 2 3 ln ⁡ ( 2 − 3 ) {\displaystyle 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)} 對於任意兩個正整數p和q，並且p＜q，我們有 H p q = q p + 2 ∑ k = 1 ⌊ q − 1 2 ⌋ cos ⁡ ( 2 π p k q ) l n ( sin ⁡ ( π k q ) ) − π 2 c o t ( π p q ) − l n ( 2 q ) {\displaystyle 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})} 對於每一個大於0的x，有 H x = x ∑ k = 1 ∞ 1 k ( x + k ) . {\displaystyle H_{x}=x\sum _{k=1}^{\infty }{\frac {1}{k(x+k)}}\,.} 由此，得 ∫ 0 1 H x d x = γ , {\displaystyle \int _{0}^{1}H_{x}\,dx=\gamma \,,} 對於每一個n，有 ∫ 0 n H x d x = ln ⁡ ( n ! ) + n γ . {\displaystyle \int _{0}^{n}H_{x}\,dx=\ln {(n!)}+n\gamma \,.} 根據定義，其他類似于調和數的數列有以下計算方法： ∑ k = 1 n 1 k = ψ ( n + 1 ) + γ {\displaystyle \sum _{k=1}^{n}{\frac {1}{k}}=\psi (n+1)+\gamma } ∑ k = 0 n 1 2 k + 1 = 1 2 [ ψ ( n + 3 2 ) + γ ] + ln ⁡ 2 {\displaystyle \sum _{k=0}^{n}{\frac {1}{2k+1}}={\frac {1}{2}}\left[\psi \left(n+{\frac {3}{2}}\right)+\gamma \right]+\ln {2}} ∑ k = 1 n 1 2 k = H n 2 {\displaystyle \sum _{k=1}^{n}{\frac {1}{2k}}={\frac {H_{n}}{2}}}