Program for computing the first n terms in a sequence - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Program for computing the first n terms in a sequence

a-teama-team Posts: 2Member
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.
Sign In or Register to comment.