Convert the following number from base 3 to base 9: 1 2 1 2 1 2 1 2 1 2 1 2 3
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.
Great shortcut!
There is a little shortcut: 1 2 1 2 1 2 1 2 1 2 1 2 3 = 1 0 1 0 1 0 1 0 1 0 1 3 × 1 2 3 = 1 1 1 1 1 1 9 × 5 9 = 5 5 5 5 5 5 9
The second equality is true since in decimal representation of 1 0 1 0 1 0 1 0 1 0 1 3 , we have only even powers of 3 that in turn are equal to correspondent consecutive powers of 9.
Since 3 2 = 9 , we can take the number 1 2 1 2 1 2 1 2 1 2 1 2 3 and split it into groups of 2-digits each, and convert each 2 digits in base 3 into 1 digit in base 9:
In our example we got 6 groups of 1 2 3 so we convert each group seperately from base 3 to base 9:
1 2 3 = 5 9
so:
1 2 1 2 1 2 1 2 1 2 1 2 3 = 5 5 5 5 5 5 9
Let's call the first digit (singles digit) of the outcome X. We can simply find X by adding the first digits of the given number until they exceed 8.
X = 2 × 3 0 + 1 × 3 1 = 5
If we add 2 × 3 2 we will get 5 + 1 8 = 2 3 which is more than one digit in base 9, therefore the first digit has to be 5.
Problem Loading...
Note Loading...
Set Loading...
Since 3 2 = 9 , we can do a 'shortcut':
1 2 1 2 1 2 1 2 1 2 1 2 3 = 1 × 3 1 1 + 2 × 3 1 0 + 1 × 3 9 + 2 × 3 8 + 1 × 3 7 + 2 × 3 6 + 1 × 3 5 + 2 × 3 4 + 1 × 3 3 + 2 × 3 2 + 1 × 3 1 + 2 × 3 0 = ( 1 × 3 + 2 ) × 9 5 + ( 1 × 3 + 2 ) × 9 4 + ( 1 × 3 + 2 ) × 9 3 + ( 1 × 3 + 2 ) × 9 2 + ( 1 × 3 + 2 ) × 9 1 + ( 1 × 3 + 2 ) × 9 0 = 5 × 9 5 + 5 × 9 4 + 5 × 9 3 + 5 × 9 2 + 5 × 9 1 + 5 × 9 0
Now, we can easily see that 1 2 1 2 1 2 1 2 1 2 1 2 3 = 5 5 5 5 5 5 9 .
Essentially, you're just pairing the digits in the number in base 3 from right to left, converting the pairs to base 10 (yes, base 10), and that's the number in base 9.