5000 Floors, Ceilings, Fracs, Logs, Powers

Let f ( x ) = 1 0 { x log ( 5000 ) } f(x)=\left\lfloor10^{\{x\log (5000)\}}\right\rfloor

There exists n n distinct non-negative integer values k 1 , k 2 , k n < 5000 k_1, k_2, \ldots k_n < 5000 such that f ( k i ) = 1 f(k_i)=1 .

Given that log ( 500 0 5000 ) = 18495 \lceil \log (5000^{5000})\rceil=18495 , find n n .

Details and Assumptions

x \lfloor x \rfloor is the largest integer smaller than x x .
x \lceil x \rceil is the smallest integer larger than x x .
{ x } = x x \{x \}=x-\lfloor x \rfloor is the fractional part of x x .


The answer is 1506.

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

Daniel Liu
Mar 8, 2015

Hint: log ( 500 0 5000 ) = 18495 \lceil \log (5000^{5000})\rceil=18495 just means that there are 18495 digits in the integer 500 0 5000 5000^{5000} (in base 10).

Can we say a similar thing about f ( x ) f(x) ?

Kartik Sharma
Mar 6, 2015

Nice problem! There is a typo though! It should be f ( k i ) f({k}_{i}) than g ( k i ) g({k}_{i}) ! Got me once!

To find which base it is, 5000 l o g ( 5000 ) = 18495 \lceil 5000log(5000) \rceil = 18495 is given from where we find that base is 10 10 .

f ( x ) = 10 x l o g ( 5000 ) ( x l o g ( 5000 ) ) f(x) = \lfloor {10}^{xlog(5000) - \lfloor (xlog(5000)) \rfloor} \rfloor

We know that 5000 = 10 4 2 5000 = \frac{{10}^{4}}{2} (not a necessary step, just cleans it a little bit)

f ( x ) = 5000 x 10 4 x x l o g ( 2 ) f(x) = \lfloor \frac{{5000}^{x}}{{10}^{\lfloor 4x - xlog(2) \rfloor}} \rfloor

f ( x ) = 10 4 x ( 10 x l o g ( 2 ) ) 10 4 x ( 2 x ) f(x) = \lfloor \frac{{10}^{4x}({10}^{\lceil xlog(2) \rceil})}{{10}^{4x}({2}^{x})} \rfloor

f ( x ) = 10 x l o g ( 2 ) 2 x f(x) = \lfloor \frac{{10}^{\lceil xlog(2) \rceil}}{{2}^{x}} \rfloor

Well, now it can be seen that l o g ( 2 ) 3 10 log(2) \approx \frac{3}{10} (This is a wrong step though but quite useful)

f ( x ) = 10 3 x 10 2 x f(x) = \lfloor \frac{{10}^{\lceil\frac{3x}{10} \rceil}}{{2}^{x}} \rfloor

Now it can easily be seen that x = 3 k x = 3k will do our job at least for a few values.

Hence, after a little bashing,

f ( x ) = 5 4 k f(x) = \lfloor {\frac{5}{4}}^{k} \rfloor and hence it can be seen that it is valid for k = 1 , 2 , 3 k = 1,2,3

and k = 4 k=4 makes it 2 2 , so x = 13 x = 13 will be our fourth solution.

As a result,

this will go on as after an increment of 1 here after 3 values, there is a decrement of 1 in 5 4 k \lfloor {\frac{5}{4}}^{k} \rfloor , therefore, again we have to increase 1 after 3 values and so on.

Therefore, our set of solutions becomes [ 3 , 6 , 9 , 13 , 16 , 19 , 23.....4996 , 4999 ] [3,6,9,13,16,19,23..... 4996,4999] . I mean an increment of 3 for 3 times and then an increment of 4 and again(starting from 3). As a result of counting, our answer becomes 1505 \boxed{1505}

As you have made approximations in your calculations, I find it very surprising that you managed to end up with the right answer.

There is a much more rigorous way to solve the problem though.

Daniel Liu - 6 years, 3 months ago

Log in to reply

Aren't the assumptions correct? I think they are quite okay.

Kartik Sharma - 6 years, 3 months ago

Fix the typo! @Daniel Liu

Kartik Sharma - 6 years, 3 months ago

Also, it can be done easily using programming

>> n = 0

>> for i in range(1,5000):

                  if int((5000**x)/(10**(int(math.log(5000**x,10)))))==1:

                                                    n = n+1

>> print n

1505

Kartik Sharma - 6 years, 3 months ago

What about k=0? The answer should be 1506.

Janardhanan Sivaramakrishnan - 6 years, 3 months ago

Log in to reply

Yes, you are correct. Originally, I had worded the problem a bit differently and that accounted for positive integers only, but after an edit to make it simpler I apparently forgot to change it to positive only. @Calvin Lin can you mark anyone who answered 1506 up to this point as correct?

Daniel Liu - 6 years, 3 months ago

Log in to reply

Thanks. I have updated the answer to 1506.

Calvin Lin Staff - 6 years, 3 months ago

Log in to reply

@Calvin Lin n positive integer values is written!

Kartik Sharma - 6 years, 3 months ago

@Calvin Lin Oh, I just wanted you to mark anyone who answered 1506 before as correct, the answer 1505 was the correct answer now...

I guess I'll change the statement back to non-negative integers.

Daniel Liu - 6 years, 3 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...