数学のブログ

“離散的”な世界 数列とその和 偶数と奇数の平方、等差数列、級数の級数

新装版 数学読本3 (松坂 和夫(著)、岩波書店)の第13章(“離散的”な世界 - 数列)、13.1(数列とその和)、平方の和、立方の和の問21の解答を求めてみる。

1

k = 1 n ( 2 k - 1 ) 2
= 4 k = 1 n k 2 - 4 k = 1 n k + n
= 2 3 n ( n + 1 ) ( 2 n + 1 ) - 2 n ( n + 1 ) + n
= 1 3 n ( 2 ( n + 1 ) ( 2 n + 1 ) - 6 ( n + 1 ) + 3 )
= 1 3 n ( ( n + 1 ) ( 4 n - 4 ) + 3 )
= 1 3 n ( 4 n 2 - 1 )

2

k = 1 n ( 2 k ) 2
= 4 k = 1 n k 2
= 4 6 n ( n + 1 ) ( 2 n + 1 )
= 2 3 n ( n + 1 ) ( 2 n + 1 )

3

k = 1 n k 2 ( 3 k - 1 )
= 3 k = 1 n k 3 - k = 1 n k 2
= 3 · ( 1 2 n ( n + 1 ) ) 2 - 1 6 n ( n + 1 ) ( 2 n + 1 )
= 1 12 n ( n + 1 ) ( 9 n ( n + 1 ) - 2 ( 2 n + 1 ) )
= 1 12 n ( n + 1 ) ( 9 n 2 - 5 n - 2 )

4

k = 1 n ( j = 1 k j )
= 1 2 k = 1 n k ( k + 1 )
= 1 2 ( k = 1 n k 2 + k = 1 n k )
= 1 2 ( 1 6 n ( n + 1 ) ( 2 n + 1 ) + 1 2 n ( n + 1 ) )
= 1 12 n ( n + 1 ) ( 2 n + 1 + 3 )
= 1 6 n ( n + 1 ) ( n + 2 )

5

k = 1 n k = 1 2 n ( n + 1 )
k = 1 1 2 n ( n + 1 ) k
= 1 2 ( 1 2 n ( n + 1 ) ) ( 1 2 n ( n + 1 ) + 1 )
= 1 8 n ( n + 1 ) ( n ( n + 1 ) + 2 )
= 1 8 n ( n + 1 ) ( n 2 + n + 2 )

コード(Wolfram Language, Jupyter)

Sum[(2 k-1)^2, {k, 1, n}]
Output
Sum[(2k)^2, {k, 1, n}]
Output
Sum[k^2(3k-1), {k, 1, n}]
Output
Sum[Sum[j, {j, 1, k}], {k, 1, n}]
Output
TraditionalForm[%]
Output
Sum[k, {k, 1, Sum[k, {k, 1, n}]}]
Output
ListPlot[{Table[(2k-1)^2, {k, 1, 10}],
          Table[(2k)^2, {k, 1, 10}]}]
Output
ListLinePlot[{Table[(2k-1)^2, {k, 1, 10}],
              Table[(2k)^2, {k, 1, 10}]}]
Output