Bases, Digits, and Digits of Bases

When a positive integer n n is written in base 2, it has a a digits, and when it is written in base a a , it has 5 digits. How many digits must a a have when written in base 2? (Leading zeroes should not be counted as digits)


The answer is 5.

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 Hinds
Mar 8, 2019

When n n is written in base 2, it has a a digits, therefore:

2 a 1 n < 2 a 2^{a-1} \leq n < 2^a

When n n is written in base a a , it has 5 digits, therefore:

a 4 n < a 5 a^{4} \leq n < a^5

For there to be an n n that exists in both of these ranges, we must have 2 a > a 4 2^a > a^4 and 2 a 1 < a 5 2^{a-1} < a^5 .

Since we are concerned with the digits of a a in base 2, let a = 2 k a=2^k .

When 2 a > a 4 2^a > a^4 :

2 ( 2 k ) > 2 4 k 2 k > 4 k (since we are working with positive integers) k > 4 (by observation) a > 2 4 \begin{aligned} 2^{(2^k)} &> 2^{4k} \\ 2^k &> 4k &\text{ (since we are working with positive integers)} \\ k &> 4 &\text{ (by observation)} \\ \implies a &> 2^4 \end{aligned}

When 2 a 1 < a 5 2^{a-1} < a^5 :

2 ( 2 k 1 ) < 2 5 k 2 k 1 < 5 k (since we are working with positive integers) k < 5 (by observation) a < 2 5 \begin{aligned} 2^{(2^k-1)} &< 2^{5k} \\ 2^k-1 &< 5k &\text{ (since we are working with positive integers)} \\ k &< 5 &\text{ (by observation)} \\ \implies a &< 2^5 \end{aligned}

We now know that a a must at least exist within the range 2 4 < a < 2 5 2^4 < a < 2^5 . All numbers in this range have 5 digits when written in base 2,

a \therefore a has 5 \boxed{5} digits when written in base 2.

Nice solution.

Mr. India - 2 years, 3 months ago

One is looking for an integer whose fourth power binary expansion has at least 16 bits as 1 6 10 = 1000 0 2 16_{10}=10000_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 = 65536 = D5D1 17 16^4=65536=\text{D5D1}_{17} . Fortunately 17 works: 1 7 4 = 83521 = 10000 17 17^4=83521=\text{10000}_{17} . 1 7 10 = 1000 1 2 17_{10}=10001_2 , which is 5 bits long. I must have spent too much time around binary computers!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...