跳到主要内容

自然数等幂求和问题与 Bernoulli 数

摘 要 本文主要介绍以下的自然数等幂求和问题

i=1nik=1k+2k++nk\sum_{i=1}^n i^k=1^k+2^k+\cdots+n^k

  我们已经知道

S0=i0=n=nS1=i1=n(n+1)2=12n2+12nS2=i2=n(n+1)(2n+1)6=13n3+12n2+16nS3=i3=(n(n+1)2)2=14n4+12n3+14n2\begin{aligned}&S_0 &&=\sum i^0 &&=n &&=n\\ &S_1 &&=\sum i^1 &&=\frac{n(n+1)}{2} &&=\frac{1}{2}n^2 +\frac{1}{2}n\\ &S_2 &&=\sum i^2 &&=\frac{n(n+1)(2n+1)}{6} &&=\frac{1}{3}n^3 +\frac{1}{2}n^2 +\frac{1}{6}n\\ &S_3 &&=\sum i^3 &&=\left(\frac{n(n+1)}{2}\right)^2 &&=\frac{1}{4}n^4 +\frac{1}{2}n^3 +\frac{1}{4}n^2\\ \end{aligned}

1 SnS_n 的递推公式

  据 Newton 二项式展开定理有

(m1)=mC1m1+C2m2+(1)1C1m+(1)(m-1)^\ell=m^\ell-\mathrm C_\ell^1 m^{\ell-1}+\mathrm C_\ell^2 m^{\ell-2}-\cdots +(-1)^{\ell-1}C_\ell^{\ell-1}m + (-1)^\ell

移项, 得

m(m1)=C1m1C2m2+(1)1C1m(1)m^\ell-(m-1)^\ell=\mathrm C_\ell^1 m^{\ell-1}-\mathrm C_\ell^2 m^{\ell-2}+\cdots -(-1)^{\ell-1}C_\ell^{\ell-1}m - (-1)^\ell

mm 取遍 1,2,,n1,2,\cdots,n 得到 nn 条等式, 所有等式两边相加, 得到式(*)

n=C1S1C2S2+(1)1C1S1(1)S0n^\ell=\mathrm C_\ell^1 S_{\ell-1}-\mathrm C_\ell^2 S_{\ell-2}+\cdots -(-1)^{\ell-1}C_\ell^{\ell-1}S_1 - (-1)^\ell S_0

移项,得

S1=1(n+C2S2+(1)1C1S1+(1)S0)S_{\ell-1}=\frac{1}{\ell}\left(n^\ell+\mathrm C_\ell^2 S_{\ell-2}-\cdots +(-1)^{\ell-1}C_\ell^{\ell-1}S_1 + (-1)^\ell S_0\right)

2 递推公式的矩阵写法

  在式(*)中将 nn 取遍 1,2,,k1,2,\cdots,k, 得到一个由 kk 条方程组成的方程组

n1=S0n2=S0+2S1n3=S03S1+3S2n4=S0+4S16S2+4S3nk=S0+S1+S2+S3++kSk1\begin{aligned} &n^1 &&= & &S_0\\ &n^2 &&= &-&S_0 &+2&S_1\\ &n^3 &&= & &S_0 &-3&S_1 &+3&S_2\\ &n^4 &&= &-&S_0 &+4&S_1 &-6&S_2 &+4&S_3\\ &\cdots\\ &n^k &&= &*&S_0 &+*&S_1 &+*&S_2 &+*&S_3 &+&\cdots &+k&S_{k-1} \end{aligned}

写成矩阵形式

(n1n2n3n4nk)=(1121331464k)(S0S1S2S3Sk1)\begin{pmatrix} n^1\\ n^2\\ n^3\\ n^4\\ \vdots\\ n^k \end{pmatrix} = \begin{pmatrix} 1\\ -1 & 2\\ 1 & -3 & 3\\ -1 & 4 & -6 & 4\\ \vdots & \vdots & \vdots & \vdots & \ddots\\ * & * & * & * & \cdots & k\\ \end{pmatrix} \begin{pmatrix} S_0\\ S_1\\ S_2\\ S_3\\ \vdots\\ S_{k-1} \end{pmatrix}

不妨简写为

n=AS\boldsymbol n=A\boldsymbol S

其中矩阵 A=(aij)n×nA=(a_{ij})_{n\times n} 中隐藏了一个杨辉三角

P=(11213314641kCk2Ck3k)=(pij)n×nP = \begin{pmatrix} 1\\ 1 & 2\\ 1 & 3 & 3\\ 1 & 4 & 6 & 4\\ \vdots & \vdots & \vdots & \vdots & \ddots\\ 1 & k & \mathrm C_k^2 & \mathrm C_k^3 & \cdots & k\\ \end{pmatrix} = (p_{ij})_{n\times n}

aij=(1)ijpij,pij={Cij1,ij0,i<ja_{ij}=(-1)^{i-j}p_{ij},\qquad p_{ij}=\left\{\begin{aligned}&\mathrm C_i^{j-1},&&i\geq j\\ &0,&&i<j\end{aligned}\right.

这里直接给出 AA 的逆

A1=(11/21/21/61/21/301/41/21/41/3001/31/21/51/k)A^{-1}=\begin{pmatrix} 1\\ 1/2 & 1/2\\ 1/6 & 1/2 & 1/3\\ 0 & 1/4 & 1/2 & 1/4\\ -1/30 & 0 & 1/3 & 1/2 & 1/5\\ \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\\ * & * & * & * & * & \cdots & 1/k\\ \end{pmatrix}

S=A1n\boldsymbol S=A^{-1}\boldsymbol n, 即是说根据 A1A^{-1} 的元素可以得到一系列等幂求和公式

S0=nS1=12n+12n2S2=16n+12n2+13n3S3=0+14n2+12n3+14n4S4=130n+0+13n3+12n4+15n5Sk1=n+n2+n3+n4+n5++1knk\begin{aligned} &S_0&&=&&n\\ &S_1&&=&\frac{1}{2}&n & +\frac{1}{2}&n^2\\ &S_2&&=&\frac{1}{6}&n & +\frac{1}{2}&n^2 & +&\frac{1}{3}n^3\\ &S_3&&=&&0 & +\frac{1}{4}&n^2 & +&\frac{1}{2}n^3 & +&\frac{1}{4}n^4\\ &S_4&&=&-\frac{1}{30}&n & +&0 & +&\frac{1}{3}n^3 & +&\frac{1}{2}n^4 & +&\frac{1}{5}n^5\\ &\cdots\\ &S_{k-1}&&=&*&n & +*&n^2 & +&*n^3 & +&*n^4 & +&*n^5 & +&\cdots & +&\frac{1}{k}n^k\\ \end{aligned}

3 对 A1A^{-1} 的观察

  现将上述求和式降幂排列

S0=nS1=12n2+12nS2=13n3+12n2+16nS3=14n4+12n4+14n2+0S4=15n5+12n4+13n3+0130nSk1=1knk+nk1+nk2+nk3+nk4++n\begin{aligned} &S_0&&=&&n\\ &S_1&&=&\frac{1}{2}&n^2 & +\frac{1}{2}&n\\ &S_2&&=&\frac{1}{3}&n^3 & +\frac{1}{2}&n^2 & +&\frac{1}{6}n\\ &S_3&&=&\frac{1}{4}&n^4 & +\frac{1}{2}&n^4 & +&\frac{1}{4}n^2 & +&0\\ &S_4&&=&\frac{1}{5}&n^5 & +\frac{1}{2}&n^4 & +&\frac{1}{3}n^3 & +&0 &-\frac{1}{30}&n\\ &\cdots\\ &S_{k-1}&&=&\frac{1}{k}&n^k & +*&n^{k-1} & +*&n^{k-2} & +*&n^{k-3} & +*&n^{k-4} & +&\cdots & +&*n\\ \end{aligned}

现抽离出系数, 记作矩阵 U=(uij)n×nU=(u_{ij})_{n\times n}. 记 T=(tij)n×n:=A1T=(t_{ij})_{n\times n}:=A^{-1}, 则有 uij=ti,ij+1u_{ij}=t_{i,i-j+1}. UU 矩阵即

U=(11/21/21/31/21/61/41/21/401/51/21/301/301/61/25/1201/1201/71/21/201/601/421/k00)U=\begin{pmatrix} 1\\ 1/2 & 1/2\\ 1/3 & 1/2 & 1/6\\ 1/4 & 1/2 & 1/4 & 0\\ 1/5 & 1/2 & 1/3 & 0 & -1/30\\ 1/6 & 1/2 & 5/12 & 0 & -1/12 & 0\\ 1/7 & 1/2 & 1/2 & 0 & -1/6 & 0 & 1/42\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\\ 1/k & * & * & 0 & * & 0 & * & \cdots & *\\ \end{pmatrix}

注意到 UU 的各元素可以分解成三数之积

U=(11112111221213111331213316141114412146161440151115512151016151001551301611166121615161620016151301660171117712172116173501735130172101771421k11)U=\begin{pmatrix} 1\cdot 1\cdot 1\\ \frac{1}{2}\cdot 1\cdot 1 & \frac{1}{2}\cdot 2\cdot \frac{1}{2} \\ \frac{1}{3}\cdot 1\cdot 1 & \frac{1}{3}\cdot 3\cdot \frac{1}{2} & \frac{1}{3}\cdot 3 \cdot \frac{1}{6}\\ \frac{1}{4}\cdot 1\cdot 1 & \frac{1}{4}\cdot 4\cdot \frac{1}{2} & \frac{1}{4}\cdot 6 \cdot \frac{1}{6} & \frac{1}{4}\cdot 4 \cdot 0\\ \frac{1}{5}\cdot 1\cdot 1 & \frac{1}{5}\cdot 5\cdot \frac{1}{2} & \frac{1}{5}\cdot 10\cdot \frac{1}{6} & \frac{1}{5}\cdot 10\cdot 0 &\frac{1}{5}\cdot 5 \cdot-\frac{1}{30}\\ \frac{1}{6}\cdot 1\cdot 1 & \frac{1}{6}\cdot 6\cdot \frac{1}{2} & \frac{1}{6}\cdot 15\cdot \frac{1}{6} & \frac{1}{6}\cdot 20\cdot 0 &\frac{1}{6}\cdot 15\cdot-\frac{1}{30} & \frac{1}{6}\cdot 6\cdot 0\\ \frac{1}{7}\cdot 1\cdot 1 & \frac{1}{7}\cdot 7\cdot \frac{1}{2} & \frac{1}{7}\cdot 21\cdot \frac{1}{6} & \frac{1}{7}\cdot 35\cdot 0 &\frac{1}{7}\cdot 35\cdot-\frac{1}{30} & \frac{1}{7}\cdot 21\cdot 0 & \frac{1}{7}\cdot 7\cdot \frac{1}{42}\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \ddots\\ \frac{1}{k}\cdot 1\cdot 1 & * & * & * & * & * & * & \cdots & *\\ \end{pmatrix}

对于 uiju_{ij}, 第一个数是 1/i1/i, 第二个数是前述杨辉三角矩阵的元素 pijp_{ij}, 第三个数是仅与列号 jj 有关的数. 记 Bernoulli 数

B0=1, B1=12, B2=16, B3=0, B4=130, B5=0, B6=142, B_0=1,\ B_1=\frac{1}{2},\ B_2=\frac{1}{6},\ B_3=0,\ B_4=-\frac{1}{30},\ B_5=0,\ B_6=\frac{1}{42},\ \cdots

uij=1i×pij×Bj1u_{ij}=\frac{1}{i}\times p_{ij}\times B_{j-1}. 注意到 Si1S_{i-1}\ell 次项的系数是 ui,i+1u_{i,i-\ell+1}. 所以

Sk1==1iuk,k+1n==1i1kpk,k+1Bkn=1k(=1kCkkBkn)=1k(=0kCkBknBk)\begin{aligned}S_{k-1}=\sum_{\ell=1}^i u_{k,k-\ell+1}n^\ell&=\sum_{\ell=1}^i \frac{1}{k}p_{k,k-\ell+1}B_{k-\ell}n^\ell\\ &=\frac{1}{k}\left(\sum_{\ell=1}^k \mathrm C_k^{k-\ell}B_{k-\ell}n^\ell\right)\\&=\frac{1}{k}\left(\sum_{\ell=0}^k \mathrm C_k^\ell\mathcal B^{k-\ell}n^\ell-B_k\right)\end{aligned}

上述使用了一个形式上的幂记号 Bn:=Bn\mathcal B^n:=B_n. 容易发现上式其实是 Newton 二项式定理的形式, 于是有

i=1nik1=(B+n)kBkk\sum_{i=1}^n i^{k-1}=\frac{(\mathcal B+n)^k-B_k}{k}

例如取 k=3k=3 时有

i2=B0n3+3B1n2+3B2n+B3B33=n3+3n2/2+n/23=13n3+12n2+16n\begin{aligned}\sum i^2&=\frac{B_0n^3+3B_1n^2+3B_2n+B_3-B_3}{3}\\&=\frac{n^3+3n^2/2+n/2}{3}\\&=\frac{1}{3}n^3 +\frac{1}{2}n^2 +\frac{1}{6}n\end{aligned}

4 Bernoulli 数的分析学定义

(未完成)

附录 A 部分 Bernoulli 数

B0=1B1=12B2=16B4=130B6=142B8=130B10=566B12=6912730B14=76B16=3617510B18=43867798B20=174611330\begin{aligned} B_0&=1 & B_1&=\frac{1}{2} & B_2&=\frac{1}{6} & B_4&=-\frac{1}{30}\\ B_6&=\frac{1}{42} & B_8&=-\frac{1}{30} & B_{10}&=\frac{5}{66} & B_{12}&=-\frac{691}{2730}\\ B_{14}&=\frac{7}{6} & B_{16}&=-\frac{3617}{510} & B_{18}&=\frac{43867}{798} & B_{20}&=-\frac{174611}{330} \end{aligned} B2k+1=0, k=1,2,B_{2k+1}=0,\ k=1,2,\cdots