Program for computing the first n terms in a sequence

edited January 2011 in Science & Tech
Hey everyone,

I have to write a program to generate the first n terms in the sequence given by the difference equation:

xk+1=111-(1130-3000/xk-1)/xk,

with starting values x1=11/2 and x2=61/11

I have to use n=10 if I am working with single precision and n=20 if I am working with double precision.

By the way, k+1, k-1, and k are all subscripts. So, xk+1 is really x "subscript" k+1, not 1 added to xk, and xk-1 is really x "subscript" k-1, not 1 subtracted from xk. Thank you very much for your help.

Comments

  • shwaipshwaip bluffin' with my muffin Icrontian
    edited January 2011
    Have you tried to do this yet? Are you running into any specific problems?
This discussion has been closed.