Sequences can be built on formulae. The formulae are based on two main elements: `n`, which is the current term, and `U_n`, which is the value of the term `n`.
`U_(n-1)` is the value of the term immediately prior to the nth term. This terminology allows for more complex sequences to be created.
this allows some complex manipulation of terms. For example, `U_(n-1)^2 xx n` means take the value of the previous term and square it, then multiply that by the current term.
What are the first five terms of the sequence given by `U_n = n^2 - n?`
|`U_n` = n2-n||0||2||6||12||20|
Answer: 0, 2, 6, 12, 20
Write, in terms of `U` and `n`, a sequence where the value of the term is equal to the values of the previous two terms.
The value of the current term is given by `U_n`, the previous values are given by `U_(n-1)` (the value of the term before) and `U_(n-2)` (the value of the term before that).
This is the Fibonacci sequence.
Answer: `U_n =U_(n-1) + U_(n-2)`