56 lines
1.9 KiB
Markdown
56 lines
1.9 KiB
Markdown
---
|
||
id: 5900f3fa1000cf542c50ff0c
|
||
challengeType: 5
|
||
title: 'Problem 140: Modified Fibonacci golden nuggets'
|
||
videoUrl: ''
|
||
localeTitle: 'Проблема 140: Модифицированные золотые самородки Фибоначчи'
|
||
---
|
||
|
||
## Description
|
||
<section id="description"> Рассмотрим бесконечный полиномиальный ряд AG (x) = xG1 + x2G2 + x3G3 + ..., где Gk - k-й член рекуррентного отношения второго порядка Gk = Gk-1 + Gk-2, G1 = 1 и G2 = 4; то есть 1, 4, 5, 9, 14, 23, .... Для этой задачи мы будем иметь дело со значениями x, для которых AG (x) является натуральным числом. Соответствующие значения x для первых пяти натуральных чисел показаны ниже. <p> xAG (x) (√5-1) / 41 2/52 (√22-2) / 63 (√137-5) / 144 1/25 </p><p> Будем называть AG (x) золотым саморождением, если x рационально, потому что они становятся все реже; например, 20-й золотой самородок - 211345365. Найдите сумму первых тридцати золотых самородков. </p></section>
|
||
|
||
## Instructions
|
||
<section id="instructions">
|
||
</section>
|
||
|
||
## Tests
|
||
<section id='tests'>
|
||
|
||
```yml
|
||
tests:
|
||
- text: <code>euler140()</code> должен вернуть 5673835352990.
|
||
testString: 'assert.strictEqual(euler140(), 5673835352990, "<code>euler140()</code> should return 5673835352990.");'
|
||
|
||
```
|
||
|
||
</section>
|
||
|
||
## Challenge Seed
|
||
<section id='challengeSeed'>
|
||
|
||
<div id='js-seed'>
|
||
|
||
```js
|
||
function euler140() {
|
||
// Good luck!
|
||
return true;
|
||
}
|
||
|
||
euler140();
|
||
|
||
```
|
||
|
||
</div>
|
||
|
||
|
||
|
||
</section>
|
||
|
||
## Solution
|
||
<section id='solution'>
|
||
|
||
```js
|
||
// solution required
|
||
```
|
||
</section>
|