For Euler 25; What is the first term in the Fibonacci sequence to contain 1000 digits?; the following seems to work.

19 May
2011
19 May
'11
1:29 p.m.
For Euler 25; What is the first term in the Fibonacci sequence to contain 1000 digits?; the following seems to work. -- For number of digits being 5 or more. fibNdigits :: Int -> Int fibNdigits nDigits = floor (((fromIntegral nDigits) - 1.0) / (logBase 10 phi)) + 2 where sq5 = sqrt 5 :: Double phi = (1 + sq5) / 2 -- -- Regards, KC
5115
Age (days ago)
5115
Last active (days ago)
0 comments
1 participants
participants (1)
-
KC