
# -*- coding: utf-8 -*-
'''
    File name: code\modified_fibonacci_golden_nuggets\sol_140.py
    Author: <NAME>
    Date created: Oct 20, 2018
    Python Version: 3.x
'''

# Solution to Project Euler Problem #140 :: Modified Fibonacci golden nuggets
# 
# For more information see:
# https://projecteuler.net/problem=140

# Problem Statement 
'''
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, ... .
For this problem we shall be concerned with values of x for which AG(x) is a positive integer.
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.
'''

# Solution 

# Solution Approach 
'''
'''


# -*- coding: utf-8 -*-
'''
    File name: code\modified_fibonacci_golden_nuggets\sol_140.py
    Author: <NAME>
    Date created: Oct 20, 2018
    Python Version: 3.x
'''

# Solution to Project Euler Problem #140 :: Modified Fibonacci golden nuggets
# 
# For more information see:
# https://projecteuler.net/problem=140

# Problem Statement 
'''
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, ... .
For this problem we shall be concerned with values of x for which AG(x) is a positive integer.
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.
'''

# Solution 

# Solution Approach 
'''
'''

# -*- coding: utf-8 -*- File name: code\modified_fibonacci_golden_nuggets\sol_140.py     Author: <NAME>     Date created: Oct 20, 2018     Python Version: 3.x # Solution to Project Euler Problem #140 :: Modified Fibonacci golden nuggets # # For more information see: # https://projecteuler.net/problem=140 # Problem Statement 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, ... . For this problem we shall be concerned with values of x for which AG(x) is a positive integer. 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. # Solution # Solution Approach