# Sequences and Series

• E. J. Redfern
Chapter
Part of the Macmillan Computer Science Series book series (COMPSS)

## Abstract

We now have sufficient knowledge of a programming language to allow us to begin to explore the application of the computer to some simple mathematical ideas. An important aspect of computing is the ability to perform repeated operations and the Pascal language allows us the facility to do this either a predetermined number of times or until a condition is satisfied. An area of mathematics in which one can apply this is to problems concerning sequences and series. Sequences consist of sets of numbers, each of which is generated from previous values in the sequence according to some rule. Hence, by repeated application of the rule we can generate the sequence of numbers from any starting value. In the case of series, we are usually interested in their sum which can be achieved by the repeated operation of adding the next term in the series to the current value of the sum. Thus, in computation terms, both concepts can be handled using the looping structures discussed in the previous chapter. Here we will describe and illustrate some of the problems in handling sequences and series on a computer. For example, from a mathematical viewpoint we are often interested in the convergence of the sequence or the sum to a finite limit. We therefore need to consider the problem of deciding when we have gone sufficiently far in our calculations to have achieved a suitable approximation to the limit.