Derivation (p-adic metric)
Let $\nu_p(z) = \max\sb{n\in\Z_{\geq 0}}{p^n \text{ divides } z}$. To show $$ \begin{align*} d_p(x,y) = \begin{cases} 0, &\text{if } x=y, \\ p^{-\nu_p(x-y)}, &\text{otherwise} \end{cases} \end{align*} $$ is a metric on $\N$, first note that $d(x,y)\geq 0$ for all $x,y\in\N$, and $d(x,y) = 0$ iff $x=y$. Also $d_p(x,y) = d_p(y,x)$ clearly.
Let $x,y,z\in\N$. We want to show that $d_p(x,z) \leq d_p(x,y) + d_p(y,z)$. We can assume $x,y,z$ are distinct since otherwise the result is clear.
Note that $$ \begin{align*} p^{\nu_p(y-x)} &\mid y-x, \\ p^{\nu_p(z-y)} &\mid z-y, \end{align*} $$ so $$ \begin{align*} p^{\min\set{\nu_p(y-x), \nu_p(z-y)}} &\mid (y-x) + (z-y) = z - x. \end{align*} $$ Then we have $v_p(z-x) \geq \min\set{\nu_p(y-x), \nu_p(z-y)}$, and therefore $$ \begin{align*} d_{p}(x,z) &= p^{-v_p(z-x)} \\ &\leq p^{-\min\set{\nu_p(y-x), \nu_p(z-y)}} \\ &\leq p^{-\nu_p(y-x)} + p^{-\nu_p(z-y)} \\ &= d_p(x,y) + d_p(y,z). \end{align*} $$