Re: Fibonacci[1,000,000,000] contains 208,987,640 decimal digits

From: Fred the Wonder Worm (ftww_at_maths.usyd.edu.au)
Date: 08/10/04


Date: 10 Aug 2004 03:38:04 GMT


In article <2npfirF385mqU1@uni-berlin.de>,
Michael Taktikos <michael.taktikos@hanse.net> wrote:
>"Ed Pegg Jr" <edpegg@gmail.com> wrote in comp.soft-sys.math.mathematica:
>> For finding the number of digits in any sufficently large Fibonacci
>> number in base 10, let k = (ArcCsch[2])/Log[10]. The number of
>> digits in Fibonacci[n] is Round[n k].
>>
>> k ~ 0.20898764024997873376927208923755541682245923991821

As someone else already pointed out, this is out by one a significant
number of times. The version I would use (for n > 0) is:

    Ceiling(n*Log[10](phi) - Log[10](Sqrt(5)))

where phi = (1 + Sqrt(5))/2. Log[10](phi) is the value of k above,
and Log[10](Sqrt(5)) is approximately 0.349485+; thus the
discrepancy.

>> Fibonacci[10^9] has 10^9 k ~ 208987640 digits.
>
> Thank you for confirming this result. It means, that the number
> mentioned in Sloane's sequence A068070 (number of digits of the
> 10^n_th Fibonacci number), like some other numbers in this sequence,
> are wrong.
> N. Sloane get now a comment to A068070 with the corrected sequence
> {0,2,21,209,2090,20899,208988,2089877,20898764,208987640,2089876402,
> 20898764025,208987640250,2089876402500,20898764024998,208987640249979,
> 2089876402499787,20898764024997873,208987640249978734,...}.

The first value is clearly not correct -- the formula does not work
for n = 0 as the contribution from 1/phi^n in the usual formula is
not negligible. Your values for n = 10 and n = 17 are also incorrect;
they should be 2089876403 and 20898764024997874 respectively. The
others are correct.

[ The current data in the online encyclopaedia as I write this is
wrong for n = 8, 9 and 16. ]

Cheers,
Geoff.

-----------------------------------------------------------------------------
Geoff Bailey (Fred the Wonder Worm) | Programmer by trade --
ftww@maths.usyd.edu.au | Gameplayer by vocation.
-----------------------------------------------------------------------------



Relevant Pages

  • Working with BIG big numbers
    ... I've tried stuff like "long double myBigNumber;" but that doesn't ... Been checking google too, and still haven't found any info. ... was working on a Fibonacci number calculator and got it to calculate up to ... digits are a little off, and over 70% of it is 0's. ...
    (comp.lang.java.help)
  • Re: Fibonacci program
    ... >> number sequence with a maximum of 9 digits. ... > The Fibonacci Series is one of those Gee Whiz numbers that turn up in many ... > overflowed the print buffer. ...
    (comp.lang.cobol)
  • Re: Fibonacci program
    ... > number sequence with a maximum of 9 digits. ... The Fibonacci Series is one of those Gee Whiz numbers that turn up in many ... overflowed the print buffer. ...
    (comp.lang.cobol)
  • Re: Fibonacci program
    ... > i have to program a cobol program where the prompt lists the fibonacci ... > number sequence with a maximum of 9 digits. ... that prints out all the fibonacci numbers that fits within 9 digits. ...
    (comp.lang.cobol)