Hello for the sequence { 2, 9, 16, 23, 30, 7, 14, 21,28 } is encoded as CONCAT(seq(k,(k=2 .. 30),7), seq(k, (k=7 .. 31),7));
but for this it is possible using SEQ or functional cmd (makemat, etc)?
{1,1,2,3,5,8,13,21}
Starting with the third number in the list, the 2, each number is obtained by adding the two previous numbers of the list. That is, 1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5,
Help with seq cmd
Modérateur : xcasadmin
-
- Messages : 562
- Inscription : sam. févr. 04, 2017 11:34 pm
- Localisation : Colombia
- Contact :
Re: Help with seq cmd
If the question is generate a Fibonacci sequence with a single seq command, I would say that you must enter the formula (obtained with rsolve for example). Maybe someone can find an astucious way to generate it, but this will probably be complicated or inefficient or both. It is much better to write a loop that is easy to write, understand and is efficient...