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?
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.