next up previous contents index
suivant: Transform a sequence into monter: Sequences précédent: Sub-sequence of a sequence   Table des matières   Index


Make a sequence or a list : seq $

seq takes two, three, four or five arguments : the first argument is an expression depending of a parameter (for example j) and the remaining argument(s) describe which values of j will be used to generate the sequence. More precisely j is assumed to move from a to b: If the Maple-like syntax is used, seq returns a sequence, if the TI-like syntax is used, seq returns a list.

$ is the infixed version of seq when seq has only two arguments and returns always a sequence.
Remark:

In summary, the different way to build a sequence are : Note that in Maple syntax, seq takes no more than 3 arguments and returns a sequence as in TI syntax, seq takes at least 4 arguments and returns a list.
Input to have a sequence with same elements :
seq(t,4)
Or :
seq(t,k=1..4)
Or :
t$4
Output :
(t,t,t,t)
Input to have a sequence :
seq(j^3,j=1..4)
Or :
(j^3)$(j=1..4)
Or :
seq(j^3,j,1..4)
Output :
(1,4,9,16)
Input to have a sequence :
seq(j^3,j=-1..4,2)
Output :
(1,1,9)
Or to have a list,
Input :
seq(j^3,j,1,4)
Output :
[1,4,9,16]
Input :
seq(j^3,j,0,5,2)
Output :
[0,8,64]
Input :
seq(j^3,j,5,0,-2)
or
seq(j^3,j,5,0,2)
Output :
[125,27,1]
Input :
seq(j^3,j,1,3,0.5)
Output :
[1,3.375,8,15.625,27]
Input :
seq(j^3,j,1,3,1/2)
Output :
[1,27/8,8,125/8,27]
Examples


next up previous contents index
suivant: Transform a sequence into monter: Sequences précédent: Sub-sequence of a sequence   Table des matières   Index
giac documentation written by Renée De Graeve and Bernard Parisse