Message304156
Is there any particular reason you want to start with 1? While not universal, it's standard to define `Fib(0) = 0`, and to start the sequence at `0`. (And note that Python usually starts indexing things from 0, so it makes sense to start with `Fib(0)` rather than `Fib(1)`.)
In principle, one could define `Fib(0)=1`, `Fib(1)=1`, `Fib(1)=2`, and so on, but there's a strong reason not to do so: it breaks (or at least uglifies) many nice number-theoretic properties, like `gcd(Fib(m), Fib(n)) == Fib(gcd(m, n))`. |
|
| Date |
User |
Action |
Args |
| 2017-10-11 16:07:56 | mark.dickinson | set | recipients:
+ mark.dickinson, docs@python, skyhein |
| 2017-10-11 16:07:56 | mark.dickinson | set | messageid: <[email protected]> |
| 2017-10-11 16:07:56 | mark.dickinson | link | issue31757 messages |
| 2017-10-11 16:07:56 | mark.dickinson | create | |
|