2018-09-30 23:01:58 +01:00
---
id: 5900f3f51000cf542c50ff08
title: 'Problem 137: Fibonacci golden nuggets'
2020-11-27 19:02:05 +01:00
challengeType: 5
2019-08-05 09:17:33 -07:00
forumTopicId: 301765
2021-01-13 03:31:00 +01:00
dashedName: problem-137-fibonacci-golden-nuggets
2018-09-30 23:01:58 +01:00
---
2020-11-27 19:02:05 +01:00
# --description--
2021-07-16 21:38:37 +02:00
Consider the infinite polynomial series $A_{F}(x) = xF_1 + x^2F_2 + x^3F_3 + \ldots$, where $F_k$ is the $k$th term in the Fibonacci sequence: $1, 1, 2, 3, 5, 8, \ldots$; that is, $F_k = F_{k − 1} + F_{k − 2}, F_1 = 1$ and $F_2 = 1$.
2020-11-27 19:02:05 +01:00
2021-07-16 21:38:37 +02:00
For this problem we shall be interested in values of $x$ for which $A_{F}(x)$ is a positive integer.
2020-11-27 19:02:05 +01:00
2021-07-16 21:38:37 +02:00
Surprisingly
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
$$\begin{align}
A_F(\frac{1}{2}) & = (\frac{1}{2}) × 1 + {(\frac{1}{2})}^2 × 1 + {(\frac{1}{2})}^3 × 2 + {(\frac{1}{2})}^4 × 3 + {(\frac{1}{2})}^5 × 5 + \cdots \\\\
& = \frac{1}{2} + \frac{1}{4} + \frac{2}{8} + \frac{3}{16} + \frac{5}{32} + \cdots \\\\
& = 2
\end{align}$$
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
The corresponding values of $x$ for the first five natural numbers are shown below.
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
| $x$ | $A_F(x)$ |
|---------------------------|----------|
| $\sqrt{2} − 1$ | $1$ |
| $\frac{1}{2}$ | $2$ |
| $\frac{\sqrt{13} − 2}{3}$ | $3$ |
| $\frac{\sqrt{89} − 5}{8}$ | $4$ |
| $\frac{\sqrt{34} − 3}{5}$ | $5$ |
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
We shall call $A_F(x)$ a golden nugget if $x$ is rational, because they become increasingly rarer; for example, the 10th golden nugget is 74049690.
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
Find the 15th golden nugget.
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
# --hints--
2018-09-30 23:01:58 +01:00
2021-07-16 21:38:37 +02:00
`goldenNugget()` should return `1120149658760` .
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
```js
2021-07-16 21:38:37 +02:00
assert.strictEqual(goldenNugget(), 1120149658760);
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --seed--
2018-09-30 23:01:58 +01:00
2020-11-27 19:02:05 +01:00
## --seed-contents--
2018-09-30 23:01:58 +01:00
```js
2021-07-16 21:38:37 +02:00
function goldenNugget() {
2020-09-15 09:57:40 -07:00
2018-09-30 23:01:58 +01:00
return true;
}
2021-07-16 21:38:37 +02:00
goldenNugget();
2018-09-30 23:01:58 +01:00
```
2020-11-27 19:02:05 +01:00
# --solutions--
2018-09-30 23:01:58 +01:00
```js
// solution required
```