2018-10-10 18:03:03 -04:00
---
id: 5900f3fa1000cf542c50ff0c
2021-02-06 04:42:36 +00:00
title: 'Problem 140: Modified Fibonacci golden nuggets'
2018-10-10 18:03:03 -04:00
challengeType: 5
2021-02-06 04:42:36 +00:00
forumTopicId: 301769
2021-01-13 03:31:00 +01:00
dashedName: problem-140-modified-fibonacci-golden-nuggets
2018-10-10 18:03:03 -04:00
---
2020-12-16 00:37:30 -07:00
# --description--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
Consider the infinite polynomial series AG(x) = xG1 + x2G2 + x3G3 + ..., where Gk is the kth term of the second order recurrence relation Gk = Gk− 1 + Gk− 2, G1 = 1 and G2 = 4; that is, 1, 4, 5, 9, 14, 23, ... .
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
For this problem we shall be concerned with values of x for which AG(x) is a positive integer.
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
The corresponding values of x for the first five natural numbers are shown below.
xAG(x) (√5− 1)/41 2/52 (√22− 2)/63 (√137− 5)/144 1/25
We shall call AG(x) a golden nugget if x is rational, because they become increasingly rarer; for example, the 20th golden nugget is 211345365. Find the sum of the first thirty golden nuggets.
2018-10-10 18:03:03 -04:00
2020-12-16 00:37:30 -07:00
# --hints--
2018-10-10 18:03:03 -04:00
2021-02-06 04:42:36 +00:00
`euler140()` should return 5673835352990.
2018-10-10 18:03:03 -04:00
```js
2020-12-16 00:37:30 -07:00
assert.strictEqual(euler140(), 5673835352990);
2018-10-10 18:03:03 -04:00
```
2021-01-13 03:31:00 +01:00
# --seed--
## --seed-contents--
```js
function euler140() {
return true;
}
euler140();
```
2020-12-16 00:37:30 -07:00
# --solutions--
2020-08-13 17:24:35 +02:00
2021-01-13 03:31:00 +01:00
```js
// solution required
```