SOLUTION: How many nonnegative integers n have the property that the digits of their base 2 representation are (in the same order) exactly the same as the digits of the base 3 representation

Algebra ->  Customizable Word Problem Solvers  -> Misc -> SOLUTION: How many nonnegative integers n have the property that the digits of their base 2 representation are (in the same order) exactly the same as the digits of the base 3 representation      Log On

Ad: Over 600 Algebra Word Problems at edhelper.com


   



Question 1161247: How many nonnegative integers n have the property that the digits of their base 2 representation are (in the same order) exactly the same as the digits of the base 3 representation of 2n?
Answer by greenestamps(13209) About Me  (Show Source):
You can put this solution on YOUR website!


The fastest way to answer this question is to list them out. The numbers have to be very small; the smallest 4-digit number in base 3 is 27; the largest 4-digit number in base 2 is 15.
   n   n (base 2)  2n  2n (base 3)
  ---------------------------------
   1         1      2        2
   2        10      4       11
   3        11      6       20
   4       100      8       22
   5       101     10      101
   6       110     12      110
   7       111     14      112
   8      1000     16      121
  ...

So the only two positive integers n for which n in base 2 has the same digits as 2n in base 3 are 5 and 6.

----------------------------------------------------------------

However, there is an opportunity for some good mathematics in solving the problem formally.

We know that the leading digit is always 1, and that all the digits are either 0 or 1

(1) If the representation is a single digit, then it is the digit 1; in both base 2 and base 3 that represents the number 1; and that does not satisfy the requirement that the number represents n in base 2 and 2n in base 3.

(2) If the representation is two digits, then it is 1a, where a is either 0 or 1.

1a in base 2 is 2+a; 1a in base 3 is 3+a.

To satisfy the requirement that the number represents n in base 2 and 2n in base 3, we would need to have
2%282%2Ba%29+=+3%2Ba
4%2B2a+=+3%2Ba
a+=+-1

So there are no 2-digit numbers that represent n in base 2 and 2n in base 3.

(3) If the representation is three digits, then it is 1ab, where both a and b are either 0 or 1.

1ab in base 2 is 4+2a+b; 1ab in base 3 is 9+3a+b.

To satisfy the requirement that the number represents n in base 2 and 2n in base 3, we would need to have
2%284%2B2a%2Bb%29+=+9%2B3a%2Bb
8%2B4a%2B2b+=+9%2B3a%2Bb
a%2Bb+=+1

That is satisfied by ab=01 or by ab = 10. That gives us the two solutions we found earlier: 101 and 110.

101 base 2 = 5; 101 base 3 = 10 = 2(5)
110 base 2 = 6; 110 base 3 = 12 = 2(6)

(4) If the representation were four digits, then it would be 1abc, where a, b, and c are all either 0 or 1.

1abc in base 2 is 8+4a+2b+c; 1ab in base 3 is 27+9a+3b+c.

To satisfy the requirement that the number represents n in base 2 and 2n in base 3, we would need to have
2%288%2B4a%2B2b%2Bc%29+=+27%2B9a%2B3b%2Bc
16%2B8a%2B4b%2B2c+=+27%2B9a%2B3b%2Bc
b%2Bc+=+11%2Ba

Clearly that can not be satisfied by three integers a, b, and c which are all either 0 or 1.

So there are no numbers of four (or more) digits that represent the number n in base 2 and the number 2n in base 3.