Sequence Defined by a Recurrence
## Formula
If:
$$a_{n+1}=a_n+d$$
then the sequence is an AP:
$$a_n=a_1+(n-1)d$$
If:
$$a_{n+1}=ra_n$$
then the sequence is a GP:
$$a_n=a_1r^{n-1}$$
## Usage
- Used to convert recurrence relations into explicit formulas for the $$n$$th term.