# Find the appropriate base

$$213_x=139_{10}$$

$$21_x=1021_4$$

How would I solve this

-
What do quadratic forms have to do with this? –  Marc van Leeuwen Mar 11 '13 at 15:16
You might want to consider accepting an answer to your questions: do accept an answer (one per question), you simply click on the $\checkmark$ to the left of the answer you'd like to accept. Plus you get 2 reputation points for each answer you accept. When you get 30+ rep, you can upvote as many answers as you'd like. –  amWhy Mar 11 '13 at 17:10

I'm not sure wether i should reply or not since this smells like homework; anyway, just think what base x means:

$213_x = 139_{10} \Rightarrow 2x^2+x+3 = 139$

$21_x = 1021_{4} \Rightarrow 2x + 1 = 4^3 + 2\cdot 4 + 1$

Now solve the 2 equations and you're done

PS : on the right side of the $\Rightarrow$ , every number is assumed to be $\text{base 10}$

-
$$213_x=139_{10}$$ $$2\cdot x^2+1\cdot x^1+3\cdot x^0=1\cdot 10^2+3\cdot 10^1+9\cdot10^0$$ $$2x^2+x+3=139$$ $$2x^2+x-136=0\Rightarrow x_{1,2}=\frac{-1\pm\sqrt{1+8\cdot 136}}{4}=\frac{-1\pm33}{4}$$ $$x_1=8$$ the base $$x_2=-17/2$$ is not a correct base see comments below.
similarly $$21_x=1021_4$$ $$2x+1=4^3+2\cdot 4 +1=73\Rightarrow x=36$$
They are wrong because $-1111_{-2} = 101_{-2}$ –  kaharas Mar 11 '13 at 18:22