data/problems/140.yml
---
:id: 140
:name: Modified Fibonacci golden nuggets
:url: https://projecteuler.net/problem=140
:content: |+
Consider the infinite polynomial series A<sub>G</sub>(_x_) = _x_G<sub>1</sub> + _x_<sup>2</sup>G<sub>2</sub> + _x_<sup>3</sup>G<sub>3</sub> + ..., where G<sub><i>k</i></sub> is the _k_th term of the second order recurrence relation G<sub><i>k</i></sub> = G<sub><i>k</i>−1</sub> + G<sub><i>k</i>−2</sub>, G<sub>1</sub> = 1 and G<sub>2</sub> = 4; that is, 1, 4, 5, 9, 14, 23, ... .
For this problem we shall be concerned with values of _x_ for which A<sub>G</sub>(_x_) is a positive integer.
The corresponding values of _x_ for the first five natural numbers are shown below.
| **_x_** | **A<sub>G</sub>(_x_)** |
| (√5−1)/4 | 1 |
| 2/5 | 2 |
| (√22−2)/6 | 3 |
| (√137−5)/14 | 4 |
| 1/2 | 5 |
We shall call A<sub>G</sub>(_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.