プロジェクト

全般

プロフィール

Problem 65 » 履歴 » バージョン 1

Noppi, 2024/01/28 12:45

1 1 Noppi
[ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]]
2
# [[Problem 65]]
3
4
## Convergents of $e$
5
The square root of $2$ can be written as an infinite continued fraction.
6
7
$\sqrt{2} = 1 + \dfrac{1}{2 + \dfrac{1}{2 + \dfrac{1}{2 + \dfrac{1}{2 + ...}}}}$
8
9
The infinite continued fraction can be written, $\sqrt{2} = [1; (2)]$, $(2)$ indicates that $2$ repeats <i>ad infinitum</i>. In a similar way, $\sqrt{23} = [4; (1, 3, 1, 8)]$.
10
11
It turns out that the sequence of partial values of continued fractions for square roots provide the best rational approximations. Let us consider the convergents for $\sqrt{2}$.
12
13
<p>$\begin{align}
14
&amp;1 + \dfrac{1}{2} = \dfrac{3}{2} \\
15
&amp;1 + \dfrac{1}{2 + \dfrac{1}{2}} = \dfrac{7}{5}\\
16
&amp;1 + \dfrac{1}{2 + \dfrac{1}{2 + \dfrac{1}{2}}} = \dfrac{17}{12}\\
17
&amp;1 + \dfrac{1}{2 + \dfrac{1}{2 + \dfrac{1}{2 + \dfrac{1}{2}}}} = \dfrac{41}{29}
18
\end{align}$</p>
19
20
Hence the sequence of the first ten convergents for $\sqrt{2}$ are:
21
22
$1, \dfrac{3}{2}, \dfrac{7}{5}, \dfrac{17}{12}, \dfrac{41}{29}, \dfrac{99}{70}, \dfrac{239}{169}, \dfrac{577}{408}, \dfrac{1393}{985}, \dfrac{3363}{2378}, ...$
23
24
What is most surprising is that the important mathematical constant,
25
$e = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, ... , 1, 2k, 1, ...]$.
26
27
The first ten terms in the sequence of convergents for $e$ are:
28
29
$2, 3, \dfrac{8}{3}, \dfrac{11}{4}, \dfrac{19}{7}, \dfrac{87}{32}, \dfrac{106}{39}, \dfrac{193}{71}, \dfrac{1264}{465}, \dfrac{1457}{536}, ...$
30
31
The sum of digits in the numerator of the $10$<sup>th</sup> convergent is $1 + 4 + 5 + 7 = 17$.
32
33
Find the sum of digits in the numerator of the $100$<sup>th</sup> convergent of the continued fraction for $e$.
34
35
## $e$ の近似分数
36
2の平方根は無限連分数として書くことができる.
37
38
√2 = 1 + 1/(2 + 1/(2 + 1/(2 + 1/(2 + ...))))
39
40
無限連分数である √2 = [1;(2)] と書くことができるが, (2) は2が無限に繰り返されることを示す. 同様に, √23 = [4;(1,3,1,8)].
41
42
平方根の部分的な連分数の数列から良い有理近似が得られることが分かる.√2の近似分数について考えよう.
43
44
1 + 1/2 = 3/2
45
1 + 1/(2 + 1/2) = 7/5
46
1 + 1/(2 + 1/(2 + 1/2)) = 17/12
47
1 + 1/(2 + 1/(2 + 1/(2 + 1/2))) = 41/29
48
49
従って, √2の近似分数からなる数列の最初の10項は:
50
51
1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, ...
52
53
もっとも驚くべきことに, 数学的に重要な定数,
54
55
e = [2; 1,2,1, 1,4,1, 1,6,1 , ... , 1,2k,1, ...].
56
57
e の近似分数からなる数列の最初の10項は:
58
59
2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, ...
60
61
10項目の近似分数の分子の桁を合計すると1+4+5+7=17である.
62
63
e についての連分数である近似分数の100項目の分子の桁の合計を求めよ.
64
65
```scheme
66
```