Let f ( x ) = ⌊ 1 0 { x lo g ( 5 0 0 0 ) } ⌋
There exists n distinct non-negative integer values k 1 , k 2 , … k n < 5 0 0 0 such that f ( k i ) = 1 .
Given that ⌈ lo g ( 5 0 0 0 5 0 0 0 ) ⌉ = 1 8 4 9 5 , find n .
Details and Assumptions
⌊
x
⌋
is the largest integer smaller than
x
.
⌈
x
⌉
is the smallest integer larger than
x
.
{
x
}
=
x
−
⌊
x
⌋
is the fractional part of
x
.
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.
Nice problem! There is a typo though! It should be f ( k i ) than g ( k i ) ! Got me once!
To find which base it is, ⌈ 5 0 0 0 l o g ( 5 0 0 0 ) ⌉ = 1 8 4 9 5 is given from where we find that base is 1 0 .
f ( x ) = ⌊ 1 0 x l o g ( 5 0 0 0 ) − ⌊ ( x l o g ( 5 0 0 0 ) ) ⌋ ⌋
We know that 5 0 0 0 = 2 1 0 4 (not a necessary step, just cleans it a little bit)
f ( x ) = ⌊ 1 0 ⌊ 4 x − x l o g ( 2 ) ⌋ 5 0 0 0 x ⌋
f ( x ) = ⌊ 1 0 4 x ( 2 x ) 1 0 4 x ( 1 0 ⌈ x l o g ( 2 ) ⌉ ) ⌋
f ( x ) = ⌊ 2 x 1 0 ⌈ x l o g ( 2 ) ⌉ ⌋
Well, now it can be seen that l o g ( 2 ) ≈ 1 0 3 (This is a wrong step though but quite useful)
f ( x ) = ⌊ 2 x 1 0 ⌈ 1 0 3 x ⌉ ⌋
Now it can easily be seen that x = 3 k will do our job at least for a few values.
Hence, after a little bashing,
f ( x ) = ⌊ 4 5 k ⌋ and hence it can be seen that it is valid for k = 1 , 2 , 3
and k = 4 makes it 2 , so x = 1 3 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 ⌊ 4 5 k ⌋ , therefore, again we have to increase 1 after 3 values and so on.
Therefore, our set of solutions becomes [ 3 , 6 , 9 , 1 3 , 1 6 , 1 9 , 2 3 . . . . . 4 9 9 6 , 4 9 9 9 ] . 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 1 5 0 5
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.
Log in to reply
Aren't the assumptions correct? I think they are quite okay.
Fix the typo! @Daniel Liu
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
What about k=0? The answer should be 1506.
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?
Log in to reply
Thanks. I have updated the answer to 1506.
Log in to reply
@Calvin Lin – n positive integer values is written!
@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.
Problem Loading...
Note Loading...
Set Loading...
Hint: ⌈ lo g ( 5 0 0 0 5 0 0 0 ) ⌉ = 1 8 4 9 5 just means that there are 18495 digits in the integer 5 0 0 0 5 0 0 0 (in base 10).
Can we say a similar thing about f ( x ) ?