Fibonacci series recursion error
Mark Dickinson
dickinsm at gmail.com
Mon May 2 17:18:36 EDT 2011
On May 2, 5:24 pm, Steven D'Aprano <steve
+comp.lang.pyt... at pearwood.info> wrote:
> As far as I'm concerned, there are only two definitions of Fibonacci
> numbers that have widespread agreement in the mathematical community:
>
> 0,1,1,2,3 ... (starting from n=0)
> 1,1,2,3,5 ... (starting from n=1)
>
> Any other definition is rather, shall we say, idiosyncratic.
And a concrete reason for preferring the above definition (in either
form) is that divisibility properties of the sequence are much neater
with this choice:
gcd(F_m, F_n) = F_{gcd(m, n)}
--
Mark
More information about the Python-list
mailing list