# Let $k$ and $w$ be digits and let $X$ be some positive integer with one or more digits. Using the two digits, $kw_7$ is a two digit base 7...

I couldn't fit the whole question in the title so here it is re-typed.

Let $$k$$ and $$w$$ be digits and let $$X$$ be some positive integer with one or more digits. Using the two digits, $$kw_7$$ is a two-digit base 7 number and $$wk_9$$ is a two-digit base 9 number. Then $$kw_7 = wk_9 = X_8$$. Determine the value of the integer $$X$$. You do not have to include base 8 in your answer.

First off I am very confused about how to even approach this problem. It is from one of my old math contests and I was wondering how to solve it since I got it wrong. I was first thinking of swapping everything to base 10 but there are not actual numbers to do so. Could someone help me out? Thank You. (Not sure about the tag too)

• $kw_7 = k\times 7 + w$ and $wk_9 = w\times 9 + k$. So just solve $X = k\times 7 + w = w\times 9 + k$. Mar 29 at 19:17

The base 7 and 9 stuff in the question is just another way of saying

$$7k + w = 9w + k$$

in base 10 (although it doesn't really matter at this stage). Simplify, therefore

$$3k = 4w$$

and the obvious solution to this, where both digits must be valid in both bases, is $$k = 4$$ and $$w = 3$$. So the base 7 number is $$43$$ and the base 9 number is $$34$$ (which in base 10 is $$7 \times 4 + 3 = 31$$ or $$9 \times 3 + 4 = 31$$). Finally, they want the answer in base 8, so we can use a similar idea, by expressing $$31$$ as

$$8a + b$$

and clearly $$a = 3$$ and $$b = 7$$. So the answer is

$$X_8 = 37_8$$

• "The most obvious solution" needs to be fleshed out. As $0 \le k < 7 < 9$ and $0 \le w < 7 < 9$ and $w,k\in \mathbb Z$ then $k=4$ and $w=3$ aren't just the most obvious solution. They are the only solution. Mar 29 at 19:19
• Thanks, will do a small edit to remove "most".
– Isco
Mar 29 at 19:23
• Thank you sooo much Mar 29 at 22:16