in reply to Re^5: OT: Finding Factor Closest To Square Root
in thread OT: Finding Factor Closest To Square Root
For instance, when computing F(n), we can make use of the addition formula to break n into 2 pieces:
Then:F(n) = F(i+j) = F(i-1)*F(j) + F(i)*F(j+1)
which we can compute using the first formula above andj = k**2 = int(sqrt(n)) i = n - j F(n) = F(i+j) = F(i+k**2)
It remains to be seen whether all of this extra work buys anything.F(k**2) = (F(k-1)+F(k+1))*F(k*(k-1)) - ((-1)**k)*F(k*(k-2))
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: OT: Finding Factor Closest To Square Root
by BrowserUk (Patriarch) on Feb 22, 2005 at 01:31 UTC | |
by hv (Prior) on Feb 22, 2005 at 12:39 UTC | |
by BrowserUk (Patriarch) on Feb 22, 2005 at 19:00 UTC |