1^3-0^3=3*1^2-3*1+12^3-1^3=3*2^2-3*2+13^3-2^3=3*3^2-3*3+1……n^3-(n-1)^3=3*(n-1)^2-3*(n-1)+1 (展开(n-1)^3)相加得:1^2+2^2+……+n^2=n*(n+1)*(2n+1)/6
1方+2方+……+n方=n(2n+1)(n+1)÷6
n(n+1)(2n+1)/6