h1

Sequences

December 7, 2009

The following is a common problem for those getting started working with sequences:

Find a formula for the general term of the sequence:
1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, …..
where the number n occurs n times in the sequence as shown.

The first step is to determine when the first occurrence of k will be. It’s not hard to show that this will be \frac{n^2 - n + 2}{2}

Call the first occurrence of k o_k. Also, define our sequence as a_n. Then:

For all o_k \leq i < o_{k+1}
a_i = k

or:

\frac{n^2 - n + 2}{2} \leq i < \frac{n^2 + n + 2}{2}

So we want our function for a_n to be some sort of floor or something, such that it maps all of those numbers in the range to n. Now, we see that we can, in a way, invert this function. By this I mean, by inverting our function for o_k. Since for all o_k \leq i < o_{k+1}, a_i = k, by inverting o_k, it will map all of the first occurrence of each integer to the correct value, and then something weird for the other ones. By taking the floor of this, it will put it to the correct value:

\frac{n^2 - n + 2}{2} = x

n^2 - n + 2 - 2x = 0

n = \frac{1}{2} + \sqrt{2x - \frac{7}{4}}

Thus, we have:

a_n =\lfloor   \frac{1}{2} + \sqrt{2n - \frac{7}{4}}  \rfloor

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.