1.8 KiB
1.8 KiB
id | challengeType | title | videoUrl | localeTitle |
---|---|---|---|---|
5900f3ad1000cf542c50fec0 | 5 | Problem 65: Convergents of e | 问题65:e的收敛 |
Description
√2= 1 + 1
2 + 1
2 + 1
2 + 1
2 + ......
可以写出无限连续分数,√2= [1;(2)],(2)表示2无限重复。以类似的方式,√23= [4;(1,3,1,8)]。事实证明,平方根的连续分数的部分值序列提供了最佳的有理近似。让我们考虑√2的收敛。
1 + 1 = 3/2
2
1 + 1 = 7/5
2 + 1
2
1 + 1 = 17/12
2 + 1
2 + 1
2
1 + 1 = 41/29
2 + 1
2 + 1
2 + 1
2
因此,√2的前十个收敛的序列是:1,3 / 2,7 / 5,17 / 12,41 / 29,99 / 70,239 / 169,577 / 408,1333 / 985,3333 / 2378 ,...最令人惊讶的是重要的数学常数,e = [2; 1,2,1,1,4,1,1,6,1,......,1,2k,1,......]。 e的会聚序列中的前十个项是:2,3,8 / 3,11 / 4,19 / 7,87 / 32,106 / 39,193 / 71,1264 / 465,1457 / 536,.... ..第10个收敛的分子中的数字之和为1 + 4 + 5 + 7 = 17。求e的连续分数的第100个收敛的分子中的位数之和。
Instructions
Tests
tests:
- text: <code>euler65()</code>应该返回272。
testString: 'assert.strictEqual(euler65(), 272, "<code>euler65()</code> should return 272.");'
Challenge Seed
function euler65() {
// Good luck!
return true;
}
euler65();
Solution
// solution required