Write down the lasgest base 5 positive integer in n digits and the largest base 7 number in m digits. it is necessary to represent n digits base 5 numbers in base 7. what is the minimum number m of digits needed to represent all possible n-digit base 5 numbers? hint the largest base 7 number should be greater than or equal to the largest n digit base 5 number.
anyone can explain this ?
We can write any number `a` in base `b` in this way:
where `a_1,a_2,ldots,a_n` are digits, that is numbers between 0 and `b-1`.
Now since 4 is the largest digit in base 5 the largest `n` digit number will be
Similarly the largest `m` digit number in base 7 will be
Now as you said to calculate the minimum number of digits in base 7 needed to represent any n digit number in base 5 the following must hold
`4cdot5^(n-1)+cdots+4cdot5+4 leq 6cdot7^(m-1)+cdots+6cdot7+6`
In the brackets we have sum of first n and m terms of geometric series which we can calculate by using the following formula
where `a_1` is the first term (in our case 1) and `r` is the ratio (in our case 5 and 7).
`4cdot(5^n-1)/(5-1) leq 6cdot(7^m-1)/(7-1)`
`4cdot(5^n-1)/4 leq 6cdot(7^m-1)/6`
`5^n-1 leq 7^m-1`
`5^n leq 7^m`
`n log_7 5 leq m` <-- Solution
So `m` must be greater than `n log_7 5`.