Skip to main content

Exploring Calculus with Maple Introductory Calculus

Section 17.1 Defining a Sequence

The shortest way to list the terms in a sequence is using the $ symbol in Maple. As an example, we may wish to list the elements of the sequence
\begin{equation*} \displaystyle\left\lbrace3k^2+2\right\rbrace_{k=0}^3\text{.} \end{equation*}
This should give four integers that follow the form of \(3k^2+2\) from index \(k=0\) up to \(k=3\text{.}\)
A dollar symbol is used after the expression of a generic term of the sequence, followed by specifying an interval for the index.
> 3*k^2+2 $ k=0..3;
\begin{equation*} \displaystyle 2,\,5,\,14,\,29 \end{equation*}
The index does not have to start at zero. Here are five integers of the sequence \(\left\lbrace2k^2-k\right\rbrace_{k=1}^5\text{:}\)
> 2*k^2-k $ k=1..5;
\begin{equation*} \displaystyle 1,\,6,\,15,\,28,\,45 \end{equation*}
We can also list the terms in a sequence by using the seq() command. This command essentially performs the same operation as the $ symbol. Here is that same sequence again, using the seq() command.
> seq(2*k^2-k, k=1..5);
\begin{equation*} \displaystyle 1,\,6,\,15,\,28,\,45 \end{equation*}