Wolfram Language Fast Introduction for Math Students
Get Started »

Sequences, Sums & Series

In the Wolfram Language, integer sequences are represented by lists.

Use Table to define a simple sequence:

In[1]:=
Click for copyable input
Table[x^2, {x, 1, 7}]
Out[1]=

Some well-known sequences are built in:

In[2]:=
Click for copyable input
Table[Fibonacci[x], {x, 1, 7}]
Out[2]=

Define a recursive sequence using RecurrenceTable:

(Note the use of {x,min,max} notation.)
In[1]:=
Click for copyable input
RecurrenceTable[{a[x] == 2 a[x - 1], a[1] == 1}, a, {x, 1, 8}]
Out[1]=

Compute the Total of the sequence:

In[2]:=
Click for copyable input
Total[%]
Out[2]=

Compute the Sum of a sequence from its generating function:

In[1]:=
Click for copyable input
Sum[i (i + 1), {i, 1, 10}]
Out[1]=

Use ESCsumtESC for a fillable typeset form:

In[2]:=
Click for copyable input
\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(10\)]\(i \((i + 1)\)\)\)
Out[2]=

You can do indefinite and multiple sums:

In[3]:=
Click for copyable input
\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 1\), \(n\)]i\ j\)\)
Out[3]=

Calculate a generating function for a sequence:

In[1]:=
Click for copyable input
FindSequenceFunction[{2, 4, 6, 8}, n]
Out[1]=

Generate power series approximations to virtually any combination of built-in functions:

In[1]:=
Click for copyable input
Series[Exp[x^2], {x, 0, 8}]
Out[1]=

O[x]9 represents higher-order terms that have been omitted; use Normal to truncate this term:

In[2]:=
Click for copyable input
Normal[%]
Out[2]=

Given an unknown or undefined function, Series returns a power series in terms of derivatives:

In[3]:=
Click for copyable input
Series[2 f[x] - 3, {x, 0, 3}]
Out[3]=

Convergent series may be automatically simplified:

In[1]:=
Click for copyable input
\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 0\), \(\[Infinity]\)]
\*SuperscriptBox[\(0.5\), \(n\)]\)
Out[1]=

QUICK REFERENCE: Integer Sequences »

QUICK REFERENCE: Series Expansions »