Using the Well ordering Principal to prove a property of integers Use the Well ordering Principle for the integers to prove that given any integer $n>0$ there exists an integer $m$ and a non negative integer $k$ such that $n=3^{k}.m$ and $3$ is not a divisor of $m$
What i tried
The Well ordering principle states that
A least element exists in every non empty set of positive integers
My own  version of the proof
Let the set $S$ be the set that represent represent the negation of the statement, $n=3^{k}m$
Hence the set $S$ is non empty and by the Wop the exists a least element $n=b$
Let $b=1$
Hence $1=3^{k}.m$
Which gives $3^{0}=3^{k}.m$
hence $b>1$
$P(b)$ is untrue
Then since $b$ is the least element, then $P(b-1)$ lies outside the set $S$ and have to be true
Hence this gives 
$b-1=3^{k}.m$
From the original equation 
$b=3^{k}.m$
Combining both  eqn, we get 
$3^{k}.m-1=3^{k}.m$
Hence $1=0$ which is a contradiation 
Hence proving the original statement
Is this way of proving also correct. Could any explain.Thanks

Call a positive integer $n$ bad if it cannot be represented as $3^k m$, where $k$ is a non-negative integer and $m$ is not divisible by $3$.
We want to show there are no bad positive integers. Suppose to the contrary that the set $B$ of bad integers is non-empty. Then $B$ contains a least element $b$.
Note that $b$ must be divisible by $3$. For suppose to the contrary it is not. then $b=3^0 b$. Since $b$ is not divisible by $3$, it follows that $b$ cannot be bad.
So $3$ divides $b$. Let $b=3b'$. By the minimality of $b$, the number $b'$ must be good. So there is a $k\ge 0$ and an $m$ such that $3$ does not divide $m$ and $b'=3^k m$. But then $b=3^{k+1}m$, contradicting the fact that $b$ is bad.
