Get Ready for 2018!

Algebra Level 5

log 2 1 + log 2 2 + log 2 3 + + log 2 n = 2018. \left\lceil\log_2 1\right\rceil+\left\lceil\log_2 2\right\rceil+\left\lceil\log_2 3\right\rceil+\cdots+\left\lceil\log_2 n\right\rceil=2018.

Find the value of n n satisfying the equation above.


The answer is 281.

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

Kartik Sharma
Oct 15, 2014

The first few terms of this series are -

0 + 1 + 2 + 2 +......

Therefore, T n = n ( 2 n 1 {T}_{n} = n({2}^{n-1} [There are better ways to explain this too which can be found easily]

First we would find a way to find sum of all the terms till n.

S = 1 ( 1 ) + 2 ( 2 ) + 3 ( 2 2 ) + . . . . + n ( 2 n 1 ) S = 1(1) + 2(2) + 3({2}^{2}) + .... + n({2}^{n-1})

2 S = 1 ( 2 ) + 2 ( 2 2 ) + 3 ( 2 3 ) + . . . . . + ( n 1 ) ( 2 n 1 ) + n ( 2 n ) 2S = 1(2) + 2({2}^{2}) + 3({2}^{3}) + ..... + (n-1)({2}^{n-1}) + n({2}^{n})

S 2 S = 1 + 2 + 2 2 + 2 3 + . . . . . . + 2 n 1 n ( 2 n S - 2S = 1 + 2 + {2}^{2} + {2}^{3} + ...... + {2}^{n-1} - n({2}^{n}

Now, ( 1 + 2 + 2 2 + 2 3 + . . . . . . + 2 n 1 ) (1 + 2 + {2}^{2} + {2}^{3} + ...... + {2}^{n-1}) is in GP

S = 2 n 1 n ( 2 n ) -S = {2}^{n} - 1 - n({2}^{n})

S = 2 n ( n 1 ) + 1 S = {2}^{n}(n-1) + 1

Now, for S < 2018, n = 8 which can be found easily.

Hence,

S 8 + l o g 2 ( k 1 ) + l o g 2 ( k 2 ) + . . . . . l o g 2 ( k n ) = 2018 {S}_{8} + \left\lceil { log }_{ 2 }{ (k }_{ 1 }) \right\rceil \quad +\quad \left\lceil { log }_{ 2 }({ k }_{ 2 }) \right\rceil \quad +.....\quad \left\lceil { log }_{ 2 }{ (k }_{ n }) \right\rceil = 2018

where l o g 2 ( k n ) \quad \left\lceil { log }_{ 2 }{ (k }_{ n }) \right\rceil is same as l o g 2 n ) \quad \left\lceil { log }_{ 2 }n) \right\rceil

Now, P = l o g 2 ( k 1 ) + l o g 2 ( k 2 ) + . . . . . l o g 2 ( k n ) \left\lceil { log }_{ 2 }{ (k }_{ 1 }) \right\rceil \quad +\quad \left\lceil { log }_{ 2 }({ k }_{ 2 }) \right\rceil \quad +.....\quad \left\lceil { log }_{ 2 }{ (k }_{ n }) \right\rceil

hence,

1793 + P = 2018

P = 225

Now, each term of P will be equal to 9 as last term of S 8 {S}_{8} is l o g 2 256 \left\lceil { log }_{ 2 }256 \right\rceil

So, P = 9x and P has x terms

9x = 225

x = 25

Therefore, n = 256 + 25 = 281 \boxed{281}

i read ceiling as floor >.> anyway here's a computer science method in c++

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include <iostream>
#include<math.h>
using namespace std;

int main()
{
    int a = 0;
    int i;
   for(i = 1; a < 2018; i++){
       a+=ceil(log2(i));
   }
   cout<<i-1;
}

returns 281

Charlton Teo - 6 years, 7 months ago

How is it possible that this is level 5? I thought it would be like level 3 or 4.

Julian Poon - 6 years, 7 months ago

Log in to reply

Yeah! Agree!!

Kartik Sharma - 6 years, 7 months ago

Your wish has been granted! :3

Prasun Biswas - 6 years, 5 months ago

Nice solution, @Kartik Sharma

Anuj Shikarkhane - 6 years, 7 months ago

Log in to reply

Thanks @Anuj Shikarkhane !

Kartik Sharma - 6 years, 7 months ago

Damn ! Got the send part wrong.

Keshav Tiwari - 6 years, 7 months ago

Log in to reply

Can you explain what are you trying to tell??

Anuj Shikarkhane - 6 years, 7 months ago

We may observe that the number of terms that give us L o g 2 X = N i s 2 N 1 , w h e n X t a k e s t h e v a l u e s f r o m ( 2 N 1 + 1 ) t o 2 N . w e h a v e : F o r X N t e r m s N t e r m s T o t a l 1 0 0 0 0 2 1 2 0 1 1 3 t o 4 2 2 1 4 5 5 t o 8 3 2 2 12 17 9 t o 16 4 2 3 32 49 17 t o 32 5 2 4 80 129 33 t o 64 6 2 5 192 321 65 t o 128 7 2 6 448 769 129 t o 256 8 2 7 1024 1793 . We are short by 2018 - 1793 =225. Next step has 256 terms of 9s. So we are in a zone where a few terms of 9 would suffice. Our X is now 256. we need 225 9 = 25 m o r e t e r m s . S o n = 256 + 25 = 281 \text{We may observe that the number of terms that give us} \left\lceil { Log_2 X } \right\rceil =N ~ is ~ 2^{N- 1},\\ when ~ X ~ takes ~ the ~ values ~ from ~( 2^{N - 1}+1) ~~ to ~ 2^N.\\ \therefore\quad \quad we \quad have :-\quad \quad \quad \\ For ~ X\quad \quad \quad N\quad \quad \quad terms \quad \quad \quad N*terms \quad \quad \quad Total\\ \quad \quad 1\quad \quad \quad 0\quad \quad \quad \quad 0\quad \quad \quad \quad \quad \quad 0\quad \quad \quad \quad \quad \quad \quad 0\\ \quad \quad ~2 \quad \quad \quad 1 \quad \quad \quad \quad 2^0 \quad \quad \quad \quad \quad 1 \quad \quad \quad \quad \quad \quad \quad \quad 1 \\ \quad ~3~to~4 \quad \quad \quad 2 \quad \quad \quad \quad 2^1 \quad \quad \quad \quad \quad 4 \quad \quad \quad \quad \quad \quad \quad \quad 5 \\ \quad ~5~to~8 \quad \quad \quad 3 \quad \quad \quad \quad 2^2 \quad \quad \quad \quad \quad 12 \quad \quad \quad \quad \quad \quad \quad \quad 17 \\ \quad ~ 9~to~16 \quad \quad \quad 4 \quad \quad \quad \quad 2^3 \quad \quad \quad \quad \quad 32 \quad \quad \quad \quad \quad \quad~~~ \quad 49\\ \quad 17~to~32 \quad \quad \quad 5 \quad \quad \quad \quad 2^4 \quad \quad \quad \quad \quad 80 \quad \quad \quad \quad \quad \quad \quad \quad 129 \\ \quad 33~to~64 \quad \quad \quad 6 \quad \quad \quad \quad 2^5 \quad \quad \quad \quad \quad 192 \quad \quad \quad \quad \quad \quad \quad \quad 321 \\ \quad 65~to~128 \quad \quad \quad 7 \quad \quad \quad \quad 2^6 \quad \quad \quad \quad \quad 448 \quad \quad \quad \quad \quad \quad \quad \quad 769 \\ \quad 129~to~256 \quad \quad \quad 8 \quad \quad \quad \quad 2^7 \quad \quad \quad \quad \quad 1024 \quad \quad \quad \quad \quad \quad \quad \quad 1793 \\ \text{. We are short by 2018 - 1793 =225.}\\ \text{Next step has 256 terms of 9s. So we are in a zone where a few terms of 9 would suffice.}\\ \text{Our X is now 256. we need } \dfrac {225} 9=25~ more ~terms. ~So~~ n= 256+25=\huge \color{#D61F06}{281}

This is a Arithmetic-Geometric Progression. We may use the formula given in Wiki. The series is (n_a=n*2^{n-1}. Kartik Sharma has used the same method given by Wiki.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...