Find the positive integer n such that sum_(k=1)^n floor(log_2 k) = 2018?

2 Answers
Oct 13, 2017

n=315

Explanation:

Completing what Oliver started...

Note that:

8(256) = 2048 > 2018

So we need less terms than:

1+2+4+8+16+32+64+128+256 = 511

and probably more than:

1+2+4+8+16+32+64+128 = 255

Start by summing:

0(1)+1(2)+2(4)+3(8)+4(16)+5(32)+6(64)+7(128)

= 0+2+8+24+64+160+384+896 = 1538

So we need an additional:

(2018-1538)/8 = 480/8 = 60 terms

So n = 255+60 = 315

Oct 13, 2017

See below.

Explanation:

We have

log_2 k = floor(log_2 k) for

k = 2^j

We know also that log_2 k is a monotonically strict increasing function of k so from j to j+1 we have 2^j equal terms with value j so we are looking for

sum_(k=1)^m k 2^(k-1) + k_2= 2018

Now considering

sum_(k=1)^n k x^(k-1) = d/(dx) sum_(k=1)^n x^k -1=d/(dx)((x^(n+1)-1)/(x-1)) -1= ((2-x) x + (m (x-1)-1) x^m)/(x-1)^2

and for x = 2

sum_(k=1)^m k 2^(k-1)=2^m (m-1)

Solving for m

2^m (m-1)=2018 we obtain

m = (Log_e 2 +W(1009 Log_e 2))/Log_e 2 = 8.14232

so considering floor(8.14232)= 8 we have

m_1 = 2^8 = 256 and

sum_(k=1)^(m_1) floor(log_2 k) = 1546

Now 2018-1546 = k_2=472 = 8 xx 59 then finally

n = m_1 + 59 = 256+59=315