<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASeq_List</id>
	<title>TI-BASIC:Seq List - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ASeq_List"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Seq_List&amp;action=history"/>
	<updated>2026-05-30T16:54:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Seq_List&amp;diff=492&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Seq_List&amp;diff=492&amp;oldid=prev"/>
		<updated>2016-02-24T18:04:10Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=SEQ-LIST.GIF&lt;br /&gt;
|summary=Creates a list by evaluating a formula with one variable taking on a range of values, optionally skipping by a specified step.&lt;br /&gt;
|syntax=seq(&amp;#039;&amp;#039;formula&amp;#039;&amp;#039;, &amp;#039;&amp;#039;variable&amp;#039;&amp;#039;, &amp;#039;&amp;#039;start-value&amp;#039;&amp;#039;, &amp;#039;&amp;#039;end-value&amp;#039;&amp;#039; [, &amp;#039;&amp;#039;step&amp;#039;&amp;#039;])&lt;br /&gt;
|location=While editing a program, press:&lt;br /&gt;
# 2nd LIST to enter the LIST menu&lt;br /&gt;
# RIGHT to enter the OPS submenu&lt;br /&gt;
# 5 to choose seq(, or use arrows.&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=1 byte&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The seq( command is very powerful, as it is (almost) the only command that can create a whole list as output. This means that you will need make use of it almost every time that you use lists. The seq( command creates a list by evaluating a formula with one variable taking on a range of several values.&lt;br /&gt;
&lt;br /&gt;
It is similar in this to the [[TI-BASIC:For|For(]] command, but unlike For(, instead of running a block of commands, it only evaluates a formula. Like the For( command, there is an optional &amp;quot;step&amp;quot; that you can use to get every 3rd, every 5th, etc. value in the range.&lt;br /&gt;
&lt;br /&gt;
Some sample uses of the command:&lt;br /&gt;
&lt;br /&gt;
 :seq(I,I,3,7&lt;br /&gt;
&lt;br /&gt;
* evaluates the expression &amp;#039;I&amp;#039; with I taking on the values 3..7&lt;br /&gt;
* returns {3,4,5,6,7}&lt;br /&gt;
&lt;br /&gt;
 :seq(AX²,X,1,7&lt;br /&gt;
&lt;br /&gt;
* evaluates the expression &amp;#039;AX²&amp;#039; with X taking on the values 1..7&lt;br /&gt;
* returns {A,4A,9A,16A,25A,36A,49A}, depending on the value of A&lt;br /&gt;
&lt;br /&gt;
 :seq(Y1(T),T,1,9,2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* evaluates the expression &amp;#039;Y1(T)&amp;#039; with T taking on every 2nd value 1..9&lt;br /&gt;
* returns {Y1(1),Y1(3),Y1(5),Y1(7),Y1(9)} depending on Y1&lt;br /&gt;
&lt;br /&gt;
Note: the value of the variable used in the expression does not change. If X has some value stored to it, and you do a seq() command using X, X will still hold that original value. However, if X was undefined before the command, after the command, it will be defined and have a value of 0.&lt;br /&gt;
&lt;br /&gt;
= Advanced Uses =&lt;br /&gt;
&lt;br /&gt;
The step argument supplied can be negative. If it is, and if the starting value is greater than the ending value, then the sequence will &amp;quot;go backward&amp;quot;, evaluating the expression in the opposite order. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :seq(I,I,1,7&lt;br /&gt;
 	{1,2,3,4,5,6,7}&lt;br /&gt;
 :seq(I,I,7,1,-1&lt;br /&gt;
 	{7,6,5,4,3,2,1}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use seq( to get a &amp;quot;sublist&amp;quot;, that is, to get a list that is only a section of another list. This is pretty much the only effective way to extract a sublist.  For example, to get the 2nd through 10th elements of L1, do the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :seq(L1(I),I,2,10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While using seq(, the calculator can still interpret keypresses and store them to [[TI-BASIC:Getkey|GetKey]]. One possible way you can use this feature is to make a [[TI-BASIC:Protection#hash|password]] function that asks the user to enter in the correct password before time expires.&lt;br /&gt;
&lt;br /&gt;
= Optimizations =&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s faster to do an operation on an entire list, than to do the same operation inside a seq( command. For example, take the following:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :seq(Y1(T),T,1,9&lt;br /&gt;
 can be&lt;br /&gt;
 :Y1(seq(T,T,1,9&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, not all commands that work for numbers will work for lists. A notable example is getting an element from a list: L1({1,2,3 will not return the first, second, and third elements of L1, so you will have to put the L1 inside the seq( command.&lt;br /&gt;
&lt;br /&gt;
For this same reason, you shouldn&amp;#039;t use a seq( command when you&amp;#039;re really performing an operation on each element of a list. For example, if L1 has 10 elements:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :seq(L1(I)²,I,1,dim(L1&lt;br /&gt;
 can be&lt;br /&gt;
 :L1²&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When generating a list of values incremented by a number i from i to a number N, seq( is not recommended as the amount of overhead on the command considerably slows the generation of the list.&lt;br /&gt;
In cases where such a list is to be generated, it is beneficial to generate a list of a specific length, fill that list with the incrementer, and cumulatively sum each value in the list. For example, if a list of all the numbers between 1 and 500 were desired:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :500→dim(L1&lt;br /&gt;
 :Fill(1,L1&lt;br /&gt;
 :cumSum(L1→L1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This operation can be sped up even more using binomcdf(. For more information please visit the related pages.&lt;br /&gt;
&lt;br /&gt;
A seq( command can replace a [[TI-BASIC:For|For(]] command, if all you&amp;#039;re doing inside the For( command is storing to an element of a list. This will improve on both speed and size of your program. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :For(I,1,10&lt;br /&gt;
 :I²→L1(I&lt;br /&gt;
 :End&lt;br /&gt;
 can be&lt;br /&gt;
 :seq(I²,I,1,10→L1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The seq( command itself can often be replaced with an unusual use of the [[TI-BASIC:Binomcdf|Binomcdf(]] or [[TI-BASIC:Binompdf|Binompdf(]] commands, improving speed and sometimes size as well. However, this optimization is fairly advanced; read the pages for those commands to learn about it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- + Command Timings&lt;br /&gt;
fill this in with appropriate information if anyone ever gets it&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#illegalnest|ERR:ILLEGAL NEST]]&amp;#039;&amp;#039;&amp;#039; is thrown if you try to use seq( inside of another seq( command.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#datatype|ERR:DATA TYPE]]&amp;#039;&amp;#039;&amp;#039; occurs when any of the inputted arguments are imaginary or complex.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:For|For(]]&lt;br /&gt;
* [[TI-BASIC:Binompdf|Binompdf(]]&lt;br /&gt;
* [[TI-BASIC:Binomcdf|Binomcdf(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>