each succesor term
is the result of multiplying a fixed constant wit
. Here is a concrete example, matched up with the natural numbers:
Here the starting point is 3 and the constant is 5. From these, called starting point and factor, respectively, every other term in the sequence is determined.
Develop the recursive function g-fives, which consumes a natural number and recursively determines the corresponding term in the above geometric sequence. Solution
Exercise 23.3.2
Develop the non-recursive function g-fives-closed. It consumes a natural number and determines the corresponding term in the above series. Solution
Exercise 23.3.3
Develop the function seq-g-fives, which consumes a natural number n and creates the sequence of the first n terms according to g-fives or g-fives-closed. Hint: Use build-list. Solution
Exercise 23.3.4
Develop geometric-series. The function consumes two numbers: start and s. Its result is a function that represents the geometric series whose starting point is start and whose factor is s. For example, (geometric-series 3 5) yields g-fives (or g-fives-closed). Solution
Exercise 23.3.5
Use series to determine the sum of the g-fives sequence
for the bounds 3, 7, and 88.
Use series to determine the sum of (geometric-series 1 .1) for the bounds 3, 7, 88.
Can an infinite geometric series have a sum? Solution