\quad 平方和公式是一个比较常用公式,用于求连续自然数的平方和(Sum of squares),其和又可称为四角锥数,或金字塔数(square pyramidal number)也就是正方形数的级数。
\quad 此公式是冯哈伯公式(Faulhaber’s formula)的一个特例。
核心: 1 2 + 2 2 + 3 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 1^2+2^2+3^2+\cdots+n^2=\dfrac{n(n+1)(2n+1)}{6} 12+22+32+⋯+n2=6n(n+1)(2n+1)
其他:
∑ k = 1 n k 2 = 1 2 + 2 2 + 3 2 + ⋯ + n 2 = n 3 3 + n 2 2 + n 6 = n ( n + 1 ) ( 2 n + 1 ) 6 \displaystyle \sum^{n}_{k=1}{k^2}=1^2+2^2+3^2+\cdots+n^2=\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6}=\dfrac{n(n+1)(2n+1)}{6} k=1∑nk2=12+22+32+⋯+n2=3n3+2n2+6n=6n(n+1)(2n+1)
∑ k = 1 n k 2 = C n + 2 3 + C n + 1 3 = 1 4 C 2 n + 2 3 = n C n + 1 2 − C n + 1 3 ∣ \displaystyle \sum^{n}_{k=1}{k^2}=C^3_{n+2}+C^3_{n+1}=\frac{1}{4}C^3_{2n+2}=nC^{2}_{n+1}-C^{3|}_{n+1} k=1∑nk2=Cn+23+Cn+13=41C2n+23=nCn+12−Cn+13∣
1、 n=1时, 1 = 1 ( 1 + 1 ) ( 2 × 1 + 1 ) 6 = 1 1= \dfrac{1(1+1)(2\times1+1)}{6}=1 1=61(1+1)(2×1+1)=1
2、 n=2时, 1 + 2 2 = 2 ( 2 + 1 ) ( 2 × 2 + 1 ) 6 = 5 1+2^2= \dfrac{2(2+1)(2\times2+1)}{6}=5 1+22=62(2+1)(2×2+1)=5
3、设 n = k ( k ∈ Z , k ≥ 2 ) n=k(k\in \mathbb{Z},k \geq 2) n=k(k∈Z,k≥2)时,公式成立,即 1 2 + 2 2 + 3 2 + ⋯ + k 2 = k ( k + 1 ) ( 2 k + 1 ) 6 1^2+2^2+3^2+\cdots+k^2=\dfrac{k(k+1)(2k+1)}{6} 12+22+32+⋯+k2=6k(k+1)(2k+1),则当n=k+1时,
1 2 + 2 2 + 3 2 + ⋯ + k 2 + ( k + 1 ) 2 1^2+2^2+3^2+\cdots+k^2+(k+1)^2 12+22+32+⋯+k2+(k+1)2
= k ( k + 1 ) ( 2 k + 1 ) 6 + ( k + 1 ) 2 =\dfrac{k(k+1)(2k+1)}{6}+(k+1)^2 =6k(k+1)(2k+1)+(k+1)2
= ( k + 1 ) [ k ( 2 k + 1 ) 6 ( k + 1 ) ] 6 =\dfrac{(k+1)[k(2k+1)6(k+1)]}{6} =6(k+1)[k(2k+1)6(k+1)]
= ( k + 1 ) ( 2 k 2 + 7 k + 6 ) 6 =\dfrac{(k+1)(2k^2+7k+6)}{6} =6(k+1)(2k2+7k+6)
= ( k + 1 ) ( k + 2 ) ( 2 k + 3 ) 6 =\dfrac{(k+1)(k+2)(2k+3)}{6} =6(k+1)(k+2)(2k+3)
= ( k + 1 ) [ ( k + 1 ) + 1 ] [ 2 ( k + 1 ) + 1 ] 6 =\dfrac{(k+1)[(k+1)+1][2(k+1)+1]}{6} =6(k+1)[(k+1)+1][2(k+1)+1]
也满足公式
根据数学归纳法,对一切自然数n有 1 2 + 2 2 + 3 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 1^2+2^2+3^2+\cdots+n^2=\dfrac{n(n+1)(2n+1)}{6} 12+22+32+⋯+n2=6n(n+1)(2n+1)成立。
恒等式: ( n + 1 ) 3 = n 3 + 3 n 2 + 3 n + 1 (n+1)^3=n^3+3n^2+3n+1 (n+1)3=n3+3n2+3n+1
所以 ( n + 1 ) 3 − n 3 = 3 n 2 + 3 n + 1 (n+1)^3-n^3=3n^2+3n+1 (n+1)3−n3=3n2+3n+1, n 3 − ( n − 1 ) 3 = 3 ( n − 1 ) 2 + 3 ( n − 1 ) + 1 n^3-(n-1)^3=3(n-1)^2+3(n-1)+1 n3−(n−1)3=3(n−1)2+3(n−1)+1
⋯ \cdots ⋯
3 3 − 2 3 = 3 × 2 2 + 3 × 2 + 1 3^3-2^3=3\times 2^2+3\times 2+1 33−23=3×22+3×2+1
2 3 − 1 3 = 3 × 1 2 + 3 × 1 + 1 2^3-1^3=3\times 1^2+3\times 1+ 1 23−13=3×12+3×1+1
求和得: ( n + 1 ) 3 − 1 = 3 ( 1 2 + 2 2 + 3 2 + ⋯ + n 2 ) + 3 ( 1 + 2 + 3 + ⋯ + n ) + n (n+1)^3-1=3(1^2+2^2+3^2+\cdots + n^2)+3(1+2+3+\cdots+n)+n (n+1)3−1=3(12+22+32+⋯+n2)+3(1+2+3+⋯+n)+n
由于 1 + 2 + 3 + ⋯ + n = n ( n + 1 ) 2 1+2+3+\cdots+n=\dfrac{n(n+1)}{2} 1+2+3+⋯+n=2n(n+1)
代入上式得:
( n + 1 ) 3 − 1 = ( n + 1 ) 3 − 1 = 3 ( 1 2 + 2 2 + 3 2 + ⋯ + n 2 ) + 3 n ( n + 1 ) 2 + n (n+1)^3-1=(n+1)^3-1=3(1^2+2^2+3^2+\cdots + n^2)+3\dfrac{n(n+1)}{2}+n (n+1)3−1=(n+1)3−1=3(12+22+32+⋯+n2)+32n(n+1)+n
整理后得:
1 2 + 2 2 + 3 2 + ⋯ + n 2 = n ( n + 1 ) ( 2 n + 1 ) 6 1^2+2^2+3^2+\cdots + n^2=\dfrac{n(n+1)(2n+1)}{6} 12+22+32+⋯+n2=6n(n+1)(2n+1)
令
=
因为
所以,
证法四 (排列组合法):
由于 ,
因此我们有
=
由于 , ,
于是我们有
证法五 (拆分,直接推导法):
1=1
2²=1+3
3²=1+3+5
4²=1+3+5+7
…
(n-1)²=1+3+5+7+…+[2(n-1)-1]
n²=1+3+5+7+…+[2n-1]
求和得:
……(*)
因为前n项平方和与前n-1项平方和差为n²
代入(*)式,得:
此式即
参考:
https://baike.baidu.com/item/平方和公式/3264126?fr=aladdin