计算1+(1+2)+(1+2+3)+…+(1+2+3+…+n).

问题描述:

计算1+(1+2)+(1+2+3)+…+(1+2+3+…+n).

∵1+2+3+…+n=

n(n+1)
2
=
n2+n
2

∴1+(1+2)+(1+2+3)+…+(1+2+3+…+n)
=
1
2
(1+12+2+22+3+32+…+n+n2
=
1
2
[(1+2+3+…+n)+(12+22+32+…+n2)]
=
1
2
•[
n(n+1)
2
+
n(n+1)(2n+1)
6
]

=
n(n+1)
4
+
n(n+1)(2n+1)
12