# Solving $x=2^y\cdot z$

For $x$, a known even number that is superior than 2, $y$ an unknown number and $z$ an unknown odd number, I am trying to solve $x=2^y\cdot z$ by factoring powers of 2 from $x$ but I don't really know how to proceed. Thanks in advance!

• You just do it. Try it for $x=38040$. – Lubin Jul 12 '18 at 18:47

1. Keep dividing $x$ by $2$ until it no longer goes in evenly. The number of times you were able to do this is $y$.
2. What's left after you cannot divide by $2$ any more is $z$.
If you factor $x$ like you said, you get an expression of the form $x=2^nu$ where $u$ is odd and $n>0$. Then
$$2^nu=2^yz.$$ By the fundamental theorem of arithmetic (uniqueness of the prime decomposition), $y=n$ and then $z=u$.