I'm trying to prove if this equation is an equivalence relation or not.
$R =\{(x,y) \in N\times N: \mbox{There exist }m,n \in N\mbox{ such that } x^m = y^n\}$
It's relatively easy to prove both reflexivity and symmetry of this relation. But I am unsure how to prove transitivity. I was thinking that $y^n = x^ac, a,c\in N$ but am unsure how to translate this into a solution.
$xRy \iff x^n = y^m$ and $yRz \iff y^s = z^t$ for natural $s,t,n,m$. Thus take $$ (y^s)^m = (y^m)^s = (x^n)^s = x^{ns}\: \text{and} \: (y^s)^m = (z^t)^m = z^{tm} $$ which gives $x^a = z^b$ for natural $a=ns, b = tm$, so $xRz$.