Home / Expert Answers / Advanced Math / recursively-defined-sequences-the-pell-numbers-0-1-2-5-12-29-70-169-408-985-dots-are-de-fined-re-pa736

(Solved): (Recursively defined sequences) The Pell numbers 0,1,2,5,12,29,70,169,408,985,dots are de- fined re ...



(Recursively defined sequences) The Pell numbers

0,1,2,5,12,29,70,169,408,985,dots

are de- fined recursively by

P_(n)={(0 if n=0),(1 if n=1),(2P_(n-1)+P_(n-2) otherwise ):}

(a) Using an EVD of a suitable 2-by-2 matrix, find the general formula for the

k

-th Pell number. (Hint. Consider the matrix

[[2,1],[1,0]]

.) (b) Write a MATLAB function, pell_formula, to compute the

k

-th Pell number using the formula derived in (a). Include the function at the end of the live script. (c) Write another MATLAB function, pell_iterative, to compute the

k

-th Pell num- ber using an iterative (non-recursive) method based on the recurrence relation provided. Include the function at the end of the live script. (d) Compare the results of the two functions written in the previous parts by computing the 800 -th Pell number,

P_(800)

. Ensure that your functions avoid recursion to prevent excessive computation time. Be sure to report the (relative) error.



We have an Answer from Expert

View Expert Answer

Expert Answer


We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe