Current time:0:00Total duration:8:18

0 energy points

# Sequences intro

Sal explains sequences and gives examples of different sequences, defined either explicitly or recursively. Created by Sal Khan.

Video transcript

What I want to do in this
video is familiarize ourselves with the notion of a sequence. And all a sequence is is
an ordered list of numbers. So for example, I could
have a finite sequence-- that means I don't have an
infinite number of numbers in it-- where, let's say, I
start at 1 and I keep adding 3. So 1 plus 3 is 4. 4 plus 3 is 7. 7 plus 3 is 10. And let's say I only have these
four terms right over here. So this one we would
call a finite sequence. I could also have an
infinite sequence. So an example of an
infinite sequence-- let's say we start at
3, and we keep adding 4. So we go to 3, to 7, to 11, 15. And you don't always have
to add the same thing. We'll explore fancier sequences. The sequences where you
keep adding the same amount, we call these
arithmetic sequences, which we will also
explore in more detail. But to show that
this is infinite, to show that we keep this
pattern going on and on and on, I'll put three dots. This just means we're going to
keep going on and on and on. So we could call this
an infinite sequence. Now, there's a bunch
of different notations that seem fancy for
denoting sequences. But this is all they refer to. But I want to make us
comfortable with how we can denote sequences and
also how we can define them. We could say that
this right over here is the sequence a sub k
for k is going from 1 to 4, is equal to this
right over here. So when we look
at it this way, we can look at each of these as
the terms in the sequence. And this right over here
would be the first term. We would call that a sub 1. This right over here
would be the second term. We'd call it a sub 2. I think you get the
picture-- a sub 3. This right over here is a sub 4. So this just says, all of the
a sub k's from k equals 1, from our first term, all
the way to the fourth term. Now, I could also define it
by not explicitly writing the sequence like this. I could essentially do
it defining our sequence as explicitly using kind of a
function notation or something close to function notation. So the same exact
sequence, I could define it as a sub k from k equals 1 to
4, with-- instead of explicitly writing the numbers
here, I could say a sub k is equal to some function of k. So let's see what happens. When k is 1, we get 1. When k is 2, we get 4. When k is 3, we get 7. So let's see. When k is 3, we added 3 twice. Let me make it clear. So this was a plus 3. This right over
here was a plus 3. This right over
here is a plus 3. So whatever k is,
we started at 1. And we added 3 one less
than the k term times. So we could say that this
is going to be equal to 1 plus k minus 1
times 3, or maybe I should write 3 times k
minus 1-- same thing. And you can verify
that this works. If k is equal to 1, you're
going to get 1 minus 1 is 0. And so a sub 1 is going to be 1. If k is equal to 2, you're going
to have 1 plus 3, which is 4. If k is equal to 3, you
get 3 times 2 plus 1 is 7. So it works out. So this is one way to explicitly
define our sequence with kind of this function notation. I want to make it clear--
I have essentially defined a function here. If I wanted a more
traditional function notation, I could have written
a of k, where k is the term that
I care about. a of k is equal to 1
plus 3 times k minus 1. This is essentially
a function, where an allowable input,
the domain, is restricted to positive integers. Now, how would I denote this
business right over here? Well, I could say that
this is equal to-- and people tend to use a. But I could use the notation
b sub k or anything else. But I'll do a again-- a sub k. And here, we're going
from our first term-- so this is a sub 1,
this is a sub 2-- all the way to infinity. Or we could define it-- if we
wanted to define it explicitly as a function-- we could write
this sequence as a sub k, where k starts at the first
term and goes to infinity, with a sub k is equaling--
so we're starting at 3. And we are adding
4 one less time. For the second term,
we added 4 once. For the third term,
we add 4 twice. For the fourth term,
we add 4 three times. So we're adding 4 one less
than the term that we're at. So it's going to be
plus 4 times k minus 1. So this is another
way of defining this infinite sequence. Now, in both of these
cases, I defined it as an explicit function. So this right over
here is explicit. That's not an attractive color. Let me write this in. This is an explicit function. And so you might
say, well, what's another way of defining
these functions? Well, we can also define
it, especially something like an arithmetic sequence, we
can also define it recursively. And I want to be clear-- not
every sequence can be defined as either an explicit
function like this, or as a recursive function. But many can,
including this, which is an arithmetic
sequence, where we keep adding the same
quantity over and over again. So how would we do that? Well, we could also--
another way of defining this first sequence,
we could say a sub k, starting at k equals
1 and going to 4 with. And when you define a
sequence recursively, you want to define what your
first term is, with a sub 1 equaling 1. You can define every other term
in terms of the term before it. And so then we
could write a sub k is equal to the previous term. So this is a sub k minus 1. So a given term is equal
to the previous term. Let me make it clear-- this is
the previous term, plus-- in this case, we're
adding 3 every time. Now, how does this make sense? Well, we're defining
what a sub 1 is. And if someone says, well,
what happens when k equals 2? Well, they're saying, well, it's
going to be a sub 2 minus 1. So it's going to
be a sub 1 plus 3. Well, we know a sub 1 is 1. So it's going to be
1 plus 3, which is 4. Well, what about a sub 3? Well, it's going to be
a sub 2 plus 3. a sub 2, we just calculated as 4. You add 3. It's going to be 7. This is essentially
what we mentally did when I first wrote out the
sequence, when I said, hey, I'm just going to start with 1. And I'm just going to add 3
for every successive term. So how would we do this one? Well, once again, we could
write this as a sub k. Starting at k, the
first term, going to infinity with-- our
first term, a sub 1, is going to be 3, now. And every successive
term, a sub k, is going to be the previous
term, a sub k minus 1, plus 4. And once again, you start at 3. And then if you want
the second term, it's going to be the
first term plus 4. It's going to be 3 plus 4. You get to 7. And you keep adding 4. So both of these,
this right over here is a recursive definition. We started with
kind of a base case. And then every term is
defined in terms of the term before it or in terms
of the function itself, but the function for
a different term.