In: Advanced Math
what combinations using only 0, 1,2, then transform that number to base 3, can give 7 when doing modulus division 9. Need a number x in base 10 that when transformed in base 3, where x%9 = 7
Firstly when a number is said to be in base N format, it means that as we cross each digit starting from the right hand side and moving left. The value is increased by a factor of N, starting from 1. For example in base 10 format the value of 11 is 1x1+10x1 = 11(This is the standard format we follow) and in base 2 format the same number 11 is equal to 1x1+2x1 = 3, the number 101 is equal to 1x1+2x0+4x1 = 5.
We also have to remember that for a base N number we have N digits i.e 0 to N-1 with which we can form the number. This means that in base 2 format we only see 2 digits i.e 0 and 1, similarly here in base 3 format we will only see 0,1,2 digits that form the number.
To convert a number from base 10 to base 3 we can do it in multiple ways one out of which is to find the highest power of 3 which is less than the base 10 number we have and store it and continue doing this with the remaining value. For example to convert 10 in base 10 to base 3, we first take 32 from 10, which leaves 1. 32 in base 3 would be 100 and 10 = 32 + 1. Therefore in base 3 it will be 101.
Assuming that all digits are not compulsory to be a part of x. Also assuming that after the number is converted to base 3, we are just considering the same digits in base 10 while performing the modulo operation.
we have only limited number of possibilities, if we consider no repetition of digits which are as follows in ascending order:
0,1,2,10,12,20,21,102,120,201,210
Now we check which of these numbers will satisfy the give condition by trial and error method.
We are certain that 0,1,2 won't have a remainder of 7.
So let's start from 10, it's 101 in base 3. Now 101%9 is the remainder left when 101 is divided by 9, i.e 2, so this doesn't satisfy the condition.
12 in base 3 is 110. 110%9 is also 2,we move to next trial.
20 in base 3 is 202. 202%9 is 4, next trial.
21 in base 3 is 210. 210%9 is 3, next trial.
102 in base 3 is 10210. 10210%9 is 4.
120 in base 3 is 11110. 11110%9 is 4.
201 in base 3 is 21110. 21110%9 is 5.
210 in base 3 is 21210. 21210%9 is 6
From all these values we can make an observation that the value of modulo 9 is the sum of the digits. Therefore we can see that x=211 would have value 7 on modulo 9 for it's base 3 number (21211), also on doing some more trial and error observations we see that this is the only 3 digit number with only 0,1,2 which satisfies the condition. If there is a requirement of higher digit terms, we can follow the same steps to do the same.