In the Fibonacci sequence, is fib(0) 0 or 1 ?

You’re correct. The Fibonacci sequence is formally defined with seed values fib(0) = 0 and fib(1) = 1. This is a requirement for the rest of the sequence to be right (and not offset by one or anything).

In mathematics, the Fibonacci numbers, commonly denoted F_n, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1.

In mathematics, the Fibonacci numbers, commonly denoted Fn, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1.

Edit: I have to concede that there is another (much less common, and usually informal) way to define the sequence by seeding it with values 1 and 1, but this is not the conventional one by any means. It is certainly not preferred in all the formal mathematical definitions I’ve seen, like The On-Line Encyclopaedia of Integer Sequences.

Leave a Comment

tech