Sequences and Sums
A sequence is a function from a subset of Z (usually {0,1,2,3,…} or {1,2,3,…}) to a set S. We use an to refer to the image of the integer n. We call an a term of the sequence. The sequence itself is denoted {an}.
For example, if an=1/n, then the sequence {an} (beginning with a1) is a1,a2,a3,…, or 1,1/2,1/3,1/4,….
A geometric sequence has the form a,ar,ar2,ar3,…,arn where a is the initial term (a real number) and r is the common ratio (also a real number). Typically, we think of such a sequence as starting with n=0 (since ar0=a). Here are some examples of geometric sequences:
- {bn},bn=(−1)n has a=−1,r=−1 and looks like −1,1,−1,1,−1,…
- {cn},cn=2×5n has a=10,r=5 and looks like 10,50,250,1250,…
- {dn},dn=6×(13)n has a=2,r=1/3 and looks like 2,2/3,2/9,2/27,…
An arithmetic sequence has the form a,a+d,a+2d,a+3d,…,a+nd where a is the initial term and d is the common difference. Typically, we think of such a sequence as starting with n=0 (since a+0d=a). Here are some examples of arithmetic sequences:
- {sn},sn=−1+4n has a=−1,d=4 and looks like −1,3,7,11,…
- {tn},tn=7−3n has a=7,d=−3 and looks like 7,4,1,−2,…
One common operation on sequences is to compute a sum of certain portions of the sequence. Suppose we have a1,a2,a3,…,am,am+1,am+2,…,an,… and we want to consider the sum from am to an: am+am+1+am+2+⋯+an. We can write this using sigma notation: n∑i=mai where:
- n is the upper limit
- m is the lower limit
- i is the index of summation
There is nothing special about using i; any (unused) variable would work!
Here are some examples of summations and sigma notation:
- The sum of the first 100 terms of {an} where an=1/n is 100∑i=1ai=100∑i=11i
- To compute the sum of the first 5 squares, we have 5∑j=1j2=12+22+32+42+52=1+4+9+16+25=55
Sometimes we might want to change the lower/upper limits without changing the sum. For example, suppose we want to change the sum 5∑j=1j2 to be written with lower limit 0 and upper limit 4. Then let k=j−1 to get 5∑j=1j2=4∑k=0(k+1)2
We can also split a sum up: n∑i=1ai=5∑i=1ai+n∑i=6ai
This means that to exclude the first few terms of a sum, we can say: n∑i=6ai=n∑i=1ai−5∑i=1ai
Summations can also be nested: n∑i=1n∑j=1ij
As an example, we compute ∑4i=1∑3j=1ij: ∑4i=1∑3j=1ij=∑4i=1(1i+2i+3i)=∑4i=16i=6+12+18+24=60
When every term is multiplied by the same thing, we can factor it out: n∑i=16i=6×n∑i=1i
Here is another example of factoring, this time with a nested summation: 4∑i=13∑j=1ij=4∑i=1(i×3∑j=1j)=4∑i=16i=6×4∑i=1i=6×10=60
You can also split over addition: n∑i=1(i+2i)=n∑i=1i+n∑i=12i This does not work for multiplication!
One useful tool is the sum of a geometric sequence, where a,r∈R and r≠0: n∑j=0arj={arn+1−ar−1if r≠1(n+1)aif r=1
Why does this work? Let S=∑nj=0arj. Then: rS=r∑nj=0arj=∑nj=0arj+1=∑n+1k=1ark=∑nk=0ark+(arn+1−a)=S+(arn+1−a)
Therefore, rS=S+(arn+1−1), so S=arn+1−ar−1 as long as r≠1 (the case when r=1 is easy).
Here are some more useful summation formulas:
- ∑nk=1k=n(n+1)2
- ∑nk=1k2=n(n+1)(2n+1)6
- ∑nk=1k3=n2(n+1)2)4
- ∑∞k=0xk=11−x when |x|<1
- ∑∞k=1kxk−1=1(1−x)2 when |x|<1
Try to derive some of these yourself. For example, ∑nk=1k=n(n+1)2 can be derived by letting S=∑nk=1k and observing that: S=1+2+3+⋯+k−1+kS=n+n−1+n−2+⋯+2+12S=(n+1)+(n+1)+(n+1)+⋯+(n+1)+(n+1)
Since there are n terms, we have 2S=n(n+1), so S=n(n=1)2=∑nk=1k.