When a positive integer n is written in base 2, it has a digits, and when it is written in base a , it has 5 digits. How many digits must a have when written in base 2? (Leading zeroes should not be counted as digits)
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 solution.
One is looking for an integer whose fourth power binary expansion has at least 16 bits as 1 6 1 0 = 1 0 0 0 0 2 ,, the smallest 5-bit unsigned binary integer. That implies the integer is at least 17 as 16 will not do as 1 6 4 = 6 5 5 3 6 = D5D1 1 7 . Fortunately 17 works: 1 7 4 = 8 3 5 2 1 = 10000 1 7 . 1 7 1 0 = 1 0 0 0 1 2 , which is 5 bits long. I must have spent too much time around binary computers!
Problem Loading...
Note Loading...
Set Loading...
When n is written in base 2, it has a digits, therefore:
2 a − 1 ≤ n < 2 a
When n is written in base a , it has 5 digits, therefore:
a 4 ≤ n < a 5
For there to be an n that exists in both of these ranges, we must have 2 a > a 4 and 2 a − 1 < a 5 .
Since we are concerned with the digits of a in base 2, let a = 2 k .
When 2 a > a 4 :
2 ( 2 k ) 2 k k ⟹ a > 2 4 k > 4 k > 4 > 2 4 (since we are working with positive integers) (by observation)
When 2 a − 1 < a 5 :
2 ( 2 k − 1 ) 2 k − 1 k ⟹ a < 2 5 k < 5 k < 5 < 2 5 (since we are working with positive integers) (by observation)
We now know that a must at least exist within the range 2 4 < a < 2 5 . All numbers in this range have 5 digits when written in base 2,
∴ a has 5 digits when written in base 2.