A positive integer m in base 10 when represented in base 2 has the representation p and in base 3 has the representation q. We get p - q = 990 where the subtraction is done in base 10. Which of the following is necessarily true?
A. 9 <= m <= 13
B. 9 <= m <= 13
C. 6 <= m <= 8
D. m <= 6
GATE 2010 · General Aptitude · Number System · medium
Answer: m must lie in the range 9 <= m <= 13. Answer: B.
Convert m = 12 to base 2 and base 3: p = 1100 (read as base 10), q = 110 (read as base 10).
Compute p - q: 1100 - 110 = 990. This matches the given condition exactly.
Verify no m outside this range works: For m = 13: binary 1101 (p=1101), ternary 111 (q=111), p-q=990. m=13 also works and is still in 9<=m<=13. For m=8: binary 1000 (p=1000), ternary 22 (q=22), p-q=978. For m=9: binary 1001 (p=1001), ternary 100 (q=100), p-q=901. For m=14: binary 1110 (p=1110), ternary 112 (q=112), p-q=998. The only m values giving p-q=990 are 12 and 13, both in 9<=m<=13.