Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Fibonacci fract...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3784 of 4173
Post > Topic >>

Fibonacci fractions.

by Albert van der Horst <albert@[EMAIL PROTECTED] > Feb 28, 2008 at 12:44 PM

This is a way to print the continued fraction of N over M:

\ \ Print out the continued fraction of N over M.
: .CF   BEGIN SWAP OVER /MOD . DUP WHILE REPEAT 2DROP ;

as in

314159 100000 .CF
3 7 15 ....
which means that PI is approximately 3 1/7

144 89 .CF
1 1 1 1 1 1 1 1 1 2

This shows an interesting property of the Fibonacci numbers 144 and 89:
their quotient shows up as all ones. (A last 2 is equivalent to 1 1).

Now I am interested in what I call the Fibonacci fraction of a number.
(It started as an idea that this may help in factoring the number,
but the following has become a challenge in its own right.)

Definition: the Fibonacci fraction of N is the rational number N/F
where the continued fraction expansion of N/F starts with a maximal
number of ones.

The problem is to find F given N; so much clear that N/F approximates
the golden ratio, or the quotient of two consecutive Fibonacci
numbers.

If something thinks this an interesting problem, and help me
find a way to calculate it efficiently and/or elegantly, I would
be much obliged.

(This is not a homework problem, so there may not be a reasonable
solution!)

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@[EMAIL PROTECTED]
 &=n http://home.hccnet.nl/a.w.m.van.der.horst
 




 1 Posts in Topic:
Fibonacci fractions.
Albert van der Horst <  2008-02-28 12:44:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:05:09 CDT 2008.