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

Your set $S$ is not well-defined.  DO you mean for $S$ to be all of $\mathbb{N}$?
Instead, fix integer $n$, and let $$S=\{m:\exists k\in\mathbb{Z}^{\ge 0},n=3^km\}$$
