A n a n-1 5. In this article we show how to write a simple program using Recursive Functions in R Programming with a practical example. This is the common ratio.
For instance f x f x 1 2 is an example of a recursive sequence because f x defines itself using f.
If you know the n th term and the common ratio r of a geometric sequence you can find the n 1 th term using the recursive formula. The previous term is written as a n 1. Visualization of a Recursive sequence. The second term is as follows.