| This is read-only version of the old wiki, feel free to browse it for materials. If you want to share your own materials, please use GeoGebraTube instead. You are also welcome to help us enhance the new wiki. If any questions arise, please contact the webmaster. |
Recursive sequences
Sequences can be given either explicitly or recursively. For the first ones, one can simply use Sequence Command. For the latter, some tricks are needed. In general case, you will have to use the spreadsheet.
Linear recurrence
For first order linear recurrence like a_n=2a_n+1 IterationList Command is sufficient.
For recurrence of higher degree we will show a solution based on matrix multiplication. Let a sequence be given by a_1=u a_2=v a_n=r*a_(n-1)+s*a_(n-2)
If you want to input this sequence, you can run following command:
Join[{u},Sequence[x({{0, 1}, {s, r}}^k (u, v)), k, 1, 10]]
This solution uses the fact that (a_n,a_(n+1)) is created from (a_(n-1),a_n) by multiplying by the matrix {{0, 1}, {s, r}}. The function x is applied to get the firs coordinate. The Join trick is needed, because GeoGebra doesn't support A^0 for matrix A.