Find the nth term of the sequence.

In summary, the sequence of positive integers is defined as follows: the first term is 1, the next two even numbers are 2 and 4, the next three odd numbers are 5, 7, and 9, the next four even numbers are 10, 12, 14, and 16, and so on. The nth term of the sequence is the largest number less than 'n' in the form $\frac{k(k+1)}{2}$. If n=N then n=k^2.
  • #1
anemone
Gold Member
MHB
POTW Director
3,883
115
A sequence of positive integers is defined as follows:

The first term is 1.
Then take the next two even numbers 2, 4.
Then take the next three odd numbers 5, 7, 9.
Then take the next four even numbers 10, 12, 14, 16 and so on.

Find the nth term of the sequence.
 
Mathematics news on Phys.org
  • #2
let N be the largest number less than 'n' in the form $\frac{k(k+1)}{2}$
$$n=k^2+2(n-N)-1$$

But here we have to find N i have an approach ,
$$n>\frac{k^2+k}{2}$$
$$2n>k^2+k$$
so i thought of finding a perfect square which less than \(\displaystyle 2n\) by at-least difference k or more than \(\displaystyle 2n\) by difference less than k
And if \(\displaystyle n=N\) then \(\displaystyle n=k^2\)
edit:changed n to 2n in last para and added some details
 
Last edited:
  • #3
the last number of m'th row is $m^2$

the first number of m'th row is $(m-1)^2+1$

for 1+2+3+4+------------+(m-1)=$\dfrac {m^2-m}{2}$

$\therefore a_(\dfrac{m^2-m+2}{2})=(m-1)^2+1$

if $a_n $ locates at m'th row

let $\dfrac {m^2-m+2}{2} \leq n------(1)$

$(m-1)^2+1=m^2-2m+2\leq 2\times n-m$

$\therefore a_n=2\times n-max(m)$

here n $\in N$

and m must satisfy (1)

for example we want to find $a_{10}$

at first we must find max(m)

$\dfrac {m^2-m+2}{2} \leq 10$

$\therefore max(m)=4$

and we have $a_{10}=20-4=16$

from (1) $\dfrac {m^2-m+2}{2} \leq n$

$m^2-m+2-2n\leq 0$

$max(m)=int(\dfrac{1+\sqrt{8n-7}}{2})$

$a_n=2n-int(\dfrac{1+\sqrt{8n-7}}{2})$
 
Last edited:
  • #4
Let this sequence be denoted $\left ( a_n \right )_{n = 1}^\infty$. It's easy to see that this sequence is predictably partitioned into "islands" of odd and even elements. These islands grow in size at a linear rate. Let each island be indexed by an integer $k$, such that, for instance, the island $\{ 1 \}$ is mapped to $k = 1$, the island $\{ 2, 4 \}$ is mapped to $k = 2$, and so on.

Given an integer $n$, we first have to find in which island $k$ the element $a_n$ is located. Due to the rate at which the islands grow, it is easy to see that the $k$th island starts at position:

$$n_k = 1 + \sum_{i = 1}^{k - 1} i = 1 + \frac{1}{2} (k - 1) k$$

That is, $a_{n_k}$ is the first element of the the $k$th island. And so $a_{n_k + k - 1}$ is the last element of the $k$th island, trivially.



Suppose that $a_n$ is located in the $k$th island. Now, there must exist an $a_m$ such that $a_m$ is in the $k$th island, but $a_{m - 1}$ is not. In other words, it is the first element of the island. Then it follows that $m = n_k$. That is:

$$m = 1 + \frac{1}{2} (k - 1) k ~ ~ \implies ~ ~ k = \frac{1}{2} \left ( \sqrt{8m - 7} + 1 \right )$$

Clearly $k$ is an integer, so $8m - 7$ must be an odd perfect square. Since $m \leq n$, we deduce that $8m - 7$ is simply the largest odd perfect square less than (or equal to) $8n - 7$. Thus, we get:

$$8m - 7 = \mathcal{Q}^2 = \text{Largest odd perfect square less than or equal to } ~ 8n - 7$$

And this gives us the island we are looking for:

$$k = \frac{1}{2} \left ( \sqrt{\mathcal{Q}^2} + 1 \right ) = \frac{\mathcal{Q} + 1}{2}$$

It turns out that $\mathcal{Q}$ can be expressed more naturally using the floor function, which yields:

$$k = \left \lfloor \frac{\lfloor \sqrt{8n - 7} \rfloor + 1}{2} \right \rfloor$$

Observe that this floor function manipulation ignores the parity of $\lfloor \sqrt{8n - 7} \rfloor$ and assumes it is odd (which is what we want).



Now that we have this island, we need to figure out the value of $a_n$. To do this, we work out the value of the last element of the island. We are smart, and we notice that this element must necessarily be a perfect square, due to the fact that the $n$th perfect square is the sum of the first $n$ odd numbers (look at the difference between terms within individual islands). In fact, the last element of the $k$th island is equal to $k^2$.

Using the result obtained a while ago, $a_{n_k + k - 1} = k^2$. Finally, within any island, the difference between each consecutive term is constant and equal to $2$. We already know the index of the term $a_n$ we are looking for, since it's, well, $n$. And we know that the last element of the island is at index $n_k + k - 1$.

Doing some simplifications:

$$n_k = 1 + \frac{1}{2} (k - 1) k ~ ~ \implies ~ ~ n_k + k - 1 = \frac{1}{2} (k - 1) k + k = \frac{k^2}{2} + \frac{k}{2}$$

Almost there! Now the difference between $n_k + k - 1$ and $n$ is thus:

$$\Delta = \frac{k^2}{2} + \frac{k}{2} - n$$

Notice that $\Delta$ is always nonnegative, since $a_n$ cannot be simultaneously inside the $k$th island and greater than the last element of the $k$th island. Using the fact that the difference between consecutive terms is $2$, we finally conclude that:

$$a_n = k^2 - 2 \Delta = k^2 - 2 \left ( \frac{k^2}{2} + \frac{k}{2} - n \right ) = 2n - k$$

Putting this all in terms of $n$ using the floor function trick above, this is equivalent to:

$$a_n = 2n - \left \lfloor \frac{\lfloor \sqrt{8n - 7} \rfloor + 1}{2} \right \rfloor$$

This can probably be simplified further, but I think it looks nice as it is :p



Enumerating the first few terms of this sequence, we obtain:

$$\left ( a_n \right )_{n = 1}^\infty = \{ 1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30, 32, 34, 36, \cdots \}$$

$$\blacksquare$$

(Whew)

 
Last edited:
  • #5


The nth term of this sequence can be calculated using the following formula:

nth term = 1 + (n-1)(-1)^n + (n-1)(n-2)/2

This formula takes into account the alternating pattern of odd and even numbers, as well as the increasing number of terms in each group. For example, the 5th term would be calculated as:

5th term = 1 + (5-1)(-1)^5 + (5-1)(5-2)/2
= 1 + 4(-1) + 4(3)/2
= 1 - 4 + 6
= 3

Therefore, the 5th term in this sequence would be 3. This formula can be used to find the nth term for any positive integer n.
 

Related to Find the nth term of the sequence.

What does "finding the nth term of a sequence" mean?

Finding the nth term of a sequence means determining a pattern or rule that allows you to calculate any term in the sequence, given its position. This can be helpful in predicting future values or understanding the behavior of the sequence.

How do I find the nth term of a sequence?

To find the nth term of a sequence, you first need to identify the pattern or rule that the sequence follows. This can involve looking for a common difference or ratio between terms, or using other techniques such as substitution or recursion. Once the pattern has been identified, you can use it to calculate the nth term.

Why is it important to find the nth term of a sequence?

Finding the nth term of a sequence can provide valuable insight into the behavior of the sequence and help make predictions about future terms. It can also be used to solve real-world problems, such as calculating population growth or predicting stock market trends.

Can all sequences have a nth term?

No, not all sequences have a simple nth term formula. Some sequences may have a more complex pattern or may not have a discernible pattern at all. In these cases, it may be necessary to use other methods, such as graphing or data analysis, to understand the sequence.

Are there different methods for finding the nth term of a sequence?

Yes, there are several different methods that can be used to find the nth term of a sequence, such as using algebraic formulas, recursive equations, or graphical methods. The most appropriate method will depend on the specific sequence and the patterns or rules that govern it.

Similar threads

  • General Math
Replies
1
Views
1K
  • General Math
Replies
8
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
4K
  • General Math
Replies
3
Views
3K
  • General Math
Replies
4
Views
2K
  • General Math
Replies
4
Views
1K
Replies
12
Views
3K
Replies
1
Views
884
  • General Math
Replies
3
Views
1K
  • General Math
Replies
2
Views
2K
Back
Top