(Maple) Finding the number of terms of the 2014th Term of Fibonacci Sequence

205 Views Asked by At

The Fibonacci sequence is defined by F0 = F1 = 1 and Fn = Fn−2 + Fn−1, n ≥ 2. In Maple, we can define the Fibonacci sequence as procedure:

F:=proc(n::nonnegint) option remember;

if n<2 then 1 else F(n-2)+F(n-1) end if;

end proc;

Consider the sequence defined by H0 = 0, H1 = 1, H2 = 2, and

Hn = (n − 3)Hn−3 + (n − 2)Hn−2 + (n − 1)Hn−1, n ≥ 3. How many digits does H2014 have?

Is there a command to find the number of digits a term have?

2

There are 2 best solutions below

0
On BEST ANSWER

The maple command that you need is ilog10. The number of decimal digits of a positive integer n is 1+ilog10(n). The answer is 5782 digits.

0
On

The number of digits of an integer $n$ is exactly the largest integer less than or equal to $\log_{10}(n)$