All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Bifonacci (Posted on 2019-02-19) Difficulty: 2 of 5
How many pairs of Fibonacci numbers each less than than 108 have a greatest common divisor equal to 233?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: Solution; also an extension Comment 2 of 2 |
(In reply to Solution by Jer)

63245986 is F39, not F52.


F52 =  32951280099   =   3 * 233 * 521 * 90481  

Its presence of a factor of 521 prevents its having a GCD of 233 with F26 but it does have such with both F13 and F39.

13 233
26 121393
39 63245986
52 32951280099

233 121393
233 63245986
233 32951280099
121393 63245986
63245986 32951280099

 a = 1: b = 1: c = 2
 Do
   d = b + c
   a = b: b = c: c = d
   ct = ct + 1
   fib(ct) = d
   q = Int(d / 233): r = q * 233 - d
   If r = 0 Then Text1.Text = Text1.Text & ct + 3 & Str(d) & crlf
 Loop Until ct = 100 Or d > 10000000000000#
 
 Text1.Text = Text1.Text & crlf
 
 For i = 1 To ct - 1
 For j = i + 1 To ct
   If gcd(fib(i), fib(j)) = 233 Then Text1.Text = Text1.Text & fib(i) & Str(fib(j)) & crlf
 Next
 Next

Function gcd(a, b)
  x = a: y = b
  Do
   q = Int(x / y)
   z = x - q * y
   x = y: y = z
  Loop Until z = 0
  gcd = x
End Function

Edited on February 19, 2019, 11:24 am
  Posted by Charlie on 2019-02-19 11:06:49

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information