Large Fibonacci Numbers Part 1

It is given that the two large Fibonacci numbers:

F 100 = 354224848179261915075 F 110 = 43566776258854844738105 \begin{aligned} F_{100} &=& 354224848179261915075 \\ F_{110} &=& 43566776258854844738105 \\ \end{aligned}

What is the value of n n such that the equation below is fulfilled?

1 + 2 + 3 + + n = gcd ( F 100 , F 110 ) 1 + 2 + 3 + \ldots + n = \text{gcd} \left ( F_{100},F_{110} \right )


The answer is 10.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Evan Harahap
Apr 21, 2015

-GCD from two fibonacci numbers is a fibonacci number too. source g c d ( F m , F n ) = F g c d ( m , n ) gcd({ F_{m}, F_{n} }) = F_{ gcd (m, n)} - where F n F_{n } is n t h n_{th} fibonacci number

-From the question above, m = 100, n = 110, so: g c d ( 100 , 110 ) = 10 gcd( 100, 110 ) = 10 F 10 = 55 F_{10} = 55 g c d ( F 100 , F 110 ) = 55 gcd({ F_{100}, F_{110} }) = 55 1 + 2 + 3 + . . . + n = 55 1 + 2 + 3 + ... + n = 55 n × ( n + 1 ) 2 = 55 \frac{ n \times (n+1) }{2} = 55 n = 10 n = 10

sorry for bad formatting

Yes, the actual values of the large numbers are just a distraction!

Chung Kevin - 6 years, 1 month ago
David Holcer
Apr 19, 2015

All python :)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from fractions import gcd
import math
gcdd=gcd(354224848179261915075,43566776258854844738105)

def quad(a,b,c):
    array=[]
    d = b**2-4*a*c
    if d < 0:
        return 0
    elif d == 0:
        x1 = -b / (2*a)
        return x1
    else:
        array.append((-b + math.sqrt(d)) / (2*a))
        array.append((-b - math.sqrt(d)) / (2*a))
        for i in array:
            if i>0:
                return int(i)

print quad(1,1,-2*gcdd)

Credit for quad function goes to Organis here whose code I modified because I was to lazy to reuse mine. Inside it, I returned first positive value if there were two solutions. What I did is got gcd (cheap way) and solved equation (n n+1/2=gcdd which is equal to n^2+n-2 gcdd=0) this is why I did 'print quad(1,1,-2*gcdd)'

There's a very simple solution for this! What other fact have you not used?

Chung Kevin - 6 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...