1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

「奇数の和」が導く美しい数学の規則性とは?

Last updated at Posted at 2025-07-21

数学には、ふとした発見から驚くような美しさが見えることがあります。

たとえば、

1 = 1  
1 + 3 = 4 
1 + 3 + 5 = 9
1 + 3 + 5 + 7 = 16 
…と続きます。

このように、最初の奇数から順に足していくと、ちょうど1, 4, 9, 16…と、平方数(1², 2², 3², …)になります。
これは数学的にも証明されており、「最初のn個の奇数の和は、n²になる」 という有名な公式に基づいています。最初の $n$ 個の奇数の和は

$$
1 + 3 + 5 + 7 + \cdots + (2n - 1) = n^2
$$

① 基底(n = 1 のとき)

左辺:1、右辺:$1^2 = 1$

② 仮定(n = k で成り立つと仮定)

$$
1 + 3 + 5 + \cdots + (2k - 1) = k^2
$$

③ n = k + 1 のとき

$$
1 + 3 + 5 + \cdots + (2k - 1) + (2k + 1)
= k^2 + (2k + 1)
= k^2 + 2k + 1
= (k + 1)^2
$$

よって、n = k + 1 のときも成り立つ。

# 検証する最大のnの値
max_n = 20

print("n | 奇数の和 | n^2 | 成立?")
print("-" * 30)

for n in range(1, max_n + 1):
    odd_sum = sum(2 * k - 1 for k in range(1, n + 1))
    square = n ** 2
    result = "" if odd_sum == square else ""
    print(f"{n:2} | {odd_sum:6} | {square:3} | {result}")
n | 奇数の和 | n^2 | 成立?
------------------------------
 1 |      1 |   1 | ✓
 2 |      4 |   4 | ✓
 3 |      9 |   9 | ✓
 4 |     16 |  16 | ✓
 5 |     25 |  25 | ✓
 6 |     36 |  36 | ✓
 7 |     49 |  49 | ✓
 8 |     64 |  64 | ✓
 9 |     81 |  81 | ✓
10 |    100 | 100 | ✓
11 |    121 | 121 | ✓
12 |    144 | 144 | ✓
13 |    169 | 169 | ✓
14 |    196 | 196 | ✓
15 |    225 | 225 | ✓
16 |    256 | 256 | ✓
17 |    289 | 289 | ✓
18 |    324 | 324 | ✓
19 |    361 | 361 | ✓
20 |    400 | 400 | ✓
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?