The sequence of increasing positive integers ( x n ) n ≥ 1 is defined as follows: x 1 = 1 , the next two terms are 2 even numbers larger than the previous terms - ( 2 and 4 ), the next three terms are the three smallest odd numbers that are larger than all the previous terms - ( 5 , 7 , 9 ), the next four terms are 4 smallest even numbers larger than all the previous terms - ( 1 0 , 1 2 , 1 4 , 1 6 ) and so on. Find x 2 0 1 5 .
Bonus : Generalize for x n .
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.
Note: The formula can be simplified to
x n = 2 n − ⌊ 2 n + 2 1 ⌋
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
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.
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?
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 where n is a positive integer with the initial value x 1 = 1 .
Denote by l the number of positive triangular numbers that are < n . Also, denote by T = { t i } i ≥ 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
⟹ x n = 2 n − l − 1 ∀ n ≥ 2 ( 1 )
Now, let n = 2 m ( m + 1 ) where m ∈ R + . Rearranging it gives a quadratic in terms of m . Solving it using quadratic formula and discarding the extraneous negative solution gives m = 2 − 1 + 1 + 8 n .
m here represents the position of n in the set T . If m is an integer, n ∈ T with t m = n . If m isn't an integer, n ∈ / T and t ⌊ m ⌋ < n < t ⌊ m ⌋ + 1
Now, we recall that the strict floor value , i.e., the greatest integer strictly less than positive real a is given by ⌈ a ⌉ − 1 . So, we have,
l = ⌈ m ⌉ − 1 ⟹ l = ⌈ 2 − 1 + 1 + 8 n ⌉ − 1 ⟹ l = ⌈ 2 1 + 1 + 8 n ⌉ − 2
Stuff this back into equation ( 1 ) and you get the required closed form. It can be verified that the closed form also works for n = 1 and so we have a closed form for x n where n ≥ 1 .
Let list the terms of the sequence, call it S , in rows of odd and even numbers as follows:
k = 1 k = 2 k = 3 k = 4 . . . k = r x 1 = 1 = 1 2 x 2 = 2 x 3 = 4 = 2 2 x 4 = 5 x 5 = 7 x 6 = 9 = 3 2 x 7 = 1 0 x 8 = 1 2 x 9 = 1 4 x 1 0 = 1 6 = 4 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . x T r = r 2
We note that the last term of the r t h row is the T r t h term, where T r = 2 r ( r + 1 ) is the r t h triangular number and that x T r = r 2 .
Since T 6 3 = 2 0 1 6 ⇒ x 2 0 1 6 = 2 0 1 6 2 and x 2 0 1 5 = 2 0 1 6 2 − 2 = 3 9 6 7
In general:
x n ⇒ x n ⇒ x 2 0 1 5 = ⌊ 2 n ⌋ 2 − 2 ( 2 ⌊ 2 n ⌋ ( ⌊ 2 n ⌋ + 1 ) − n ) = 2 n − ⌊ 2 n ⌋ = 4 0 3 0 − ⌊ 4 0 3 0 ⌋ = 4 0 3 0 − 6 3 = 3 9 6 7
Hm, can you explain how you arrived at the general formula? I don't see why 2 n is involved. I think it's more like ⌊ 2 n + 1 ⌋ . This is because we want to find the r such that 2 ( r − 1 ) r < n ≤ 2 r ( r + 1 ) (possibly with some typo).
Your generalized value is wrong. Say for example, as x 1 2 = 1 9 by the definition of the problem, your generalized formula results in 2 0 when we put n = 1 2 .
My generalized version is this:
x n = 2 n + 1 − ⌈ 2 1 + 1 + 8 n ⌉ .
Look at this note :/
You can check my solution too :)
Problem Loading...
Note Loading...
Set Loading...
We arrange the terms of the sequence ( x n ) in a triangular array according to the given rule so that the 1 s t level consists of a single 1 and for all k ≥ 2 , the k t h level consists of the k consecutive even (odd) integers that follow the last odd (even) integer in the ( k − 1 ) t h level:
For any given integer n , let l n denote the unique integer such that:
( 2 l n ) < n ≤ ( 2 l n + 1 )
that is,
2 ( l n − 1 ) l n < n ≤ 2 l n ( l n + 1 ) ....(1)
Note that l n is simply the number of the level which x n is on. We claim that:
x n = 2 n − l n .... (2)
When n = 1 , clearly l 1 = 1 and thus 2 n − l n = 1 = x 1 . Suppose (2) holds for some n ≥ 1 . There are two possible cases:
Case-1 : If n + 1 ≤ ( 2 l n + 1 ) ; that is, if x n + 1 and x n are on the same level, then l n + 1 = l n and hence
x n + 1 = x n + 2 = 2 n − l n + 2 = 2 ( n + 1 ) − l n + 1
Case-2 : If n + 1 > ( 2 l n + 1 ) then x n is the last number on the l n t h level and x n + 1 is the first number on the l n + 1 t h level. Thus
l n + 1 = l n + 1
and
x n + 1 = x n + 1 = 2 n − 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 )
Solving the inequalities, we easily obtain:
l n < 2 1 + 1 + 8 n ≤ l n + 1
Hence,
l n = ⌈ 2 1 + 1 + 8 n ⌉ − 1 ....(3)
From (2) and (3) we conclude that:
x n = 2 n + 1 − ⌈ 2 1 + 1 + 8 n ⌉
Substituting n = 2 0 1 5 , we obtain x 2 0 1 5 = 3 9 6 7 .