Faster Recursive Fibonacci Numbers

rusi rustompmody at gmail.com
Wed May 18 11:23:17 EDT 2011


On May 18, 7:27 pm, RJB <rbott... at csusb.edu> wrote:

> Thank you!  Very cool and clear.  I
> hoped that there was something that Python made natural I couldn't see
> after 50 years in other languages.
>
> I'd like to work on combining both approaches.  It may take a while...

>From the Knuth identity F[n+m] = ..
you pulled out two special cases
F[2n+1] = ..
and
F[2n] = ..

If you get one more: F[2n -1] = ..
you are done



More information about the Python-list mailing list