Peculiar Sequence of Positive Integers!

The sequence of increasing positive integers ( x n ) n 1 {(x_n)_{n \geq 1}} is defined as follows: x 1 = 1 \large{x_1 = 1} , the next two terms are 2 even numbers larger than the previous terms - ( 2 2 and 4 4 ), the next three terms are the three smallest odd numbers that are larger than all the previous terms - ( 5 , 7 , 9 5, 7, 9 ), the next four terms are 4 smallest even numbers larger than all the previous terms - ( 10 , 12 , 14 , 16 10, 12, 14, 16 ) and so on. Find x 2015 \large{x_{2015}} .

Bonus : Generalize for x n \large{x_n} .


The answer is 3967.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Satyajit Mohanty
Jul 29, 2015

We arrange the terms of the sequence ( x n ) (x_n) in a triangular array according to the given rule so that the 1 s t 1^{st} level consists of a single 1 and for all k 2 k \geq 2 , the k t h k^{th} level consists of the k k consecutive even (odd) integers that follow the last odd (even) integer in the ( k 1 ) t h (k-1)^{th} level:

For any given integer n n , let l n l_n denote the unique integer such that:

( l n 2 ) < n ( l n + 1 2 ) {l_n \choose 2} < n \leq {l_n + 1 \choose 2}

that is,

( l n 1 ) l n 2 < n l n ( l n + 1 ) 2 ....(1) \dfrac{(l_n-1)l_n}{2} < n \leq \dfrac{l_n(l_n+1)}{2}\quad \quad \text{ ....(1)}

Note that l n l_n is simply the number of the level which x n x_n is on. We claim that:

x n = 2 n l n .... (2) x_n = 2n - l_n \quad \quad \text{ .... (2) }

When n = 1 n = 1 , clearly l 1 = 1 l_1 = 1 and thus 2 n l n = 1 = x 1 2n-l_n = 1 = x_1 . Suppose (2) holds for some n 1 n \geq 1 . There are two possible cases:

Case-1 : If n + 1 ( l n + 1 2 ) n+1 \leq {l_n+1 \choose 2} ; that is, if x n + 1 x_{n+1} and x n x_n are on the same level, then l n + 1 = l n l_{n+1} = l_n and hence

x n + 1 = x n + 2 = 2 n l n + 2 = 2 ( n + 1 ) l n + 1 x_{n+1} = x_n + 2 = 2n - l_n + 2 = 2(n+1) - l_{n+1}

Case-2 : If n + 1 > ( l n + 1 2 ) n+1 > {l_n + 1 \choose 2} then x n x_n is the last number on the l n t h l_n^{th} level and x n + 1 x_{n+1} is the first number on the l n + 1 t h l_{n+1}^{th} level. Thus

l n + 1 = l n + 1 l_{n+1} = l_n + 1

and

x n + 1 = x n + 1 = 2 n l n + 1 = 2 ( n + 1 ) l n + 1 x_{n+1} = x_n + 1 = 2n - l_n + 1 = 2(n+1) - l_{n+1}

Hence, by induction, (2) is established. From (1) we get

l n 2 l n < 2 n ( l n + 1 ) 2 ( l n + 1 ) l_n^2 - l_n <2n \leq (l_n + 1)^2 - (l_n + 1)

Solving the inequalities, we easily obtain:

l n < 1 + 1 + 8 n 2 l n + 1 l_n < \dfrac{1 + \sqrt{1+8n}}{2} \leq l_n + 1

Hence,

l n = 1 + 1 + 8 n 2 1 ....(3) l_n = \left \lceil \dfrac{1 + \sqrt{1+8n}}{2} \right \rceil - 1 \quad \quad \text{ ....(3)}

From (2) and (3) we conclude that:

x n = 2 n + 1 1 + 1 + 8 n 2 \large{x_n = 2n + 1 - \left \lceil \dfrac{1 + \sqrt{1+8n}}{2} \right \rceil}

Substituting n = 2015 n = 2015 , we obtain x 2015 = 3967 x_{2015} = \boxed{3967} .

Note: The formula can be simplified to

x n = 2 n 2 n + 1 2 x_n = 2n - \lfloor \sqrt{ 2n } + \frac{1}{2} \rfloor

Calvin Lin Staff - 5 years, 10 months ago

The problem becomes quite obvious once when one notes the following recurrence:

x n + 1 = { x n + 1 , if n is triangular x n + 2 , otherwise n 1 ; x 1 = 1 x_{n+1}=\begin{cases}x_n+1\quad,\text{ if }n\textrm{ is triangular}\\ x_n+2\quad,\textrm{ otherwise}\end{cases}~\forall~n\geq 1~~;~~x_1=1

By "triangular", I'm referring to triangular numbers . This recurrence is easily solvable by using summation methods and with a bit of simple algebraic manipulation would give the closed form in your solution.

Prasun Biswas - 5 years, 10 months ago

Log in to reply

.

This recurrence is easily solvable by using summation methods and with a bit of simple algebraic manipulation would give the closed form in your solution.

Easily solvable? Can you show your working please?

Pi Han Goh - 5 years, 6 months ago

Log in to reply

Well, I'm not sure if it's a rigorous approach, but yes, it is easily solvable. Ok, maybe not that easy. We want a closed form for x n x_n where n n is a positive integer with the initial value x 1 = 1 x_1=1 .

Denote by l l the number of positive triangular numbers that are < n \lt n . Also, denote by T = { t i } i 1 T=\{t_i\}_{i\geq 1} the sequence (set) of triangular numbers. Then, using the recurrence relation, we have,

x n = ( 1 i < n i T 1 ) + ( 1 i < n i T 2 ) + x 1 = l + ( n 1 l ) 2 + 1 \large x_n=\left(\sum_{1\leq i\lt n~\land~i\in T} 1\right)+\left(\sum_{1\leq i\lt n~\land~i\notin T} 2\right)+x_1=l+(n-1-l)2+1

x n = 2 n l 1 n 2 (1) \implies x_n=2n-l-1~\forall~n\geq 2\tag1

Now, let n = m ( m + 1 ) 2 n=\dfrac{m(m+1)}{2} where m R + m\in\Bbb{R^+} . Rearranging it gives a quadratic in terms of m m . Solving it using quadratic formula and discarding the extraneous negative solution gives m = 1 + 1 + 8 n 2 m=\dfrac{-1+\sqrt{1+8n}}{2} .

m m here represents the position of n n in the set T T . If m m is an integer, n T n\in T with t m = n t_m=n . If m m isn't an integer, n T n\notin T and t m < n < t m + 1 t_{\lfloor m\rfloor}\lt n\lt t_{\lfloor m\rfloor+1}

Now, we recall that the strict floor value , i.e., the greatest integer strictly less than positive real a a is given by a 1 \lceil a\rceil-1 . So, we have,

l = m 1 l = 1 + 1 + 8 n 2 1 l = 1 + 1 + 8 n 2 2 l=\lceil m\rceil-1\implies l=\left\lceil\frac{-1+\sqrt{1+8n}}{2}\right\rceil-1\implies l=\left\lceil\frac{1+\sqrt{1+8n}}{2}\right\rceil-2

Stuff this back into equation ( 1 ) (1) and you get the required closed form. It can be verified that the closed form also works for n = 1 n=1 and so we have a closed form for x n x_n where n 1 n\geq 1 .

Prasun Biswas - 5 years, 6 months ago
Chew-Seong Cheong
Jul 28, 2015

Let list the terms of the sequence, call it S S , in rows of odd and even numbers as follows:

k = 1 x 1 = 1 = 1 2 k = 2 x 2 = 2 x 3 = 4 = 2 2 k = 3 x 4 = 5 x 5 = 7 x 6 = 9 = 3 2 k = 4 x 7 = 10 x 8 = 12 x 9 = 14 x 10 = 16 = 4 2 . . . . . . k = r . . . . . . . . . . . . . . . . . . . . . . . . x T r = r 2 \begin{array} {lc} k = 1 & x_{\color{#D61F06}{1}} = 1 = \color{#3D99F6}{1^2} \\ k= 2 & x_2 = 2 \quad x_{\color{#D61F06}{3}} = 4 = \color{#3D99F6}{2^2} \\ k=3 & x_4 = 5 \quad x_5 = 7 \quad x_{\color{#D61F06}{6}} = 9 = \color{#3D99F6} {3^2} \\ k = 4 & x_7 = 10 \quad x_8 = 12 \quad x_9 = 14 \quad x_{\color{#D61F06}{10}} = 16 = \color{#3D99F6}{4^2} \\ ... & ... \\ k = r & ... \quad ... \quad ... \quad ... \quad ... \quad ... \quad ... \quad ... \quad x_{\color{#D61F06}{T_r}} = \color{#3D99F6}{r^2} \end{array}

We note that the last term of the r t h r^{th} row is the T r t h \color{#D61F06}{T_r}^{th} term, where T r = r ( r + 1 ) 2 T_r = \dfrac{r(r+1)}{2} is the r t h r^{th} triangular number and that x T r = r 2 x_{\color{#D61F06}{T_r}} = \color{#3D99F6}{r^2} .

Since T 63 = 2016 x 2016 = 201 6 2 T_{63} = 2016 \quad \Rightarrow x_{2016} = 2016^2 and x 2015 = 201 6 2 2 = 3967 x_{2015} = 2016^2 - 2 = \boxed{3967}

In general:

x n = 2 n 2 2 ( 2 n ( 2 n + 1 ) 2 n ) x n = 2 n 2 n x 2015 = 4030 4030 = 4030 63 = 3967 \begin{aligned} x_n & = \left \lfloor \sqrt{2n} \right \rfloor ^2 - 2 \left(\dfrac{\left \lfloor \sqrt{2n} \right \rfloor \left( \left \lfloor \sqrt{2n} \right \rfloor + 1 \right)}{2} - n \right) \\ \Rightarrow x_n & = 2n - \left \lfloor \sqrt{2n} \right \rfloor \\ \Rightarrow x_{2015} & = 4030 - \left \lfloor \sqrt{4030} \right \rfloor = 4030 - 63 = \boxed{3967} \end{aligned}

Moderator note:

Hm, can you explain how you arrived at the general formula? I don't see why 2 n \sqrt{ 2n} is involved. I think it's more like 2 n + 1 \lfloor \sqrt{2n} + 1 \rfloor . This is because we want to find the r r such that ( r 1 ) r 2 < n r ( r + 1 ) 2 \frac{ (r-1) r } { 2} < n \leq \frac{ r(r+1) } {2} (possibly with some typo).

Your generalized value is wrong. Say for example, as x 12 = 19 x_{12} = 19 by the definition of the problem, your generalized formula results in 20 20 when we put n = 12 n=12 .

My generalized version is this:

x n = 2 n + 1 1 + 1 + 8 n 2 \large{x_n = 2n + 1 - \left \lceil \dfrac{1 + \sqrt{1+8n}}{2} \right \rceil} .

Look at this note :/

You can check my solution too :)

Satyajit Mohanty - 5 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...