I am new to stack exchange though I have used it to help me through some struggles before. This question I cannot find an answer to.

I'm looking to create a set of polynomials where the 'i'th polynomial is some combination of the previous polynomial and the second previous polynomial. For example.

 Subscript[M, i] = 
 Subscript[Z, i]*Subscript[M, i - 1] - 
  Subscript[K, i]^2*Subscript[M, i - 2]

If I provide the first two elements can I generate this list such that I can ask for the 50th polynomial. Grant it the size will be extraordinary. Thanks!


1 Answer 1


You could do for example

n = 5;
Subscript[m, 1] = Subscript[m, 2] = 1;

Table[Subscript[m, i] = 
  Subscript[z, i]*Subscript[m, i - 1] - 
   Subscript[k, i]^2*Subscript[m, i - 2], {i, 3, n}];

which gives

Subscript[m, #] & /@ Range[n] // ColumnForm

enter image description here

  • $\begingroup$ Thank you eldo it appears this works perfectly! I knew it would be a simple fix but I'm too inexperienced to get it yet. Thank you though. Also Kuba thank you for the advice I didn't think to check for recurrence but I will now! Thanks guys $\endgroup$
    – KFGauss
    Commented Jul 19, 2017 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.