If we have $k$ in the group $(G, \star)$ for three consecutive integers $$\forall a,b \in G \quad (a \star b)^k = a^k \star b^ k$$ The prove for showing $(G, \star)$ is commutative is as follow:
$(ab)^i=a^ib^i$.
$(ab)^{i+1}=a^{i+1}b^{i+1}$.
$(ab)^{i+2}=a^{i+2}b^{i+2}$.
$(ba)^i=a^{-1}(ab)^{i+1}b^{-1}=a^{-1}(a^{i+1}b^{i+1})b^{-1}=a^ib^i$.
So, $(ab)^i=(ba)^i$.
$(ba)^{i+1}=a^{-1}(ab)^{i+2}b^{-1}=a^{-1}(a^{i+2}b^{i+2})b^{-1}=a^{i+1}b^{i+1}$.
So, $(ab)^{i+1}=(ba)^{i+1}$.
Let $c:=(ab)^i=(ba)^i$.
$(ab)c=(ab)(ab)^i=(ab)^{i+1}=(ba)^{i+1}=(ba)(ba)^i=(ba)c$.
So, $ab=ba$ by cancellation law.
But I want to show that we can't say the same thing for two consecutive integers.
So assume that $i$ and $i+1$ are two consecutive integers. We can't say $i+2$ is too because I say maybe it's not in the domain. So for showing that we can't have the same result for only 2 consecutive integers:
$(ab)^i=a^ib^i$.
$(ab)^{i+1}=a^{i+1}b^{i+1}$.
$(ba)^i=a^{-1}(ab)^{i+1}b^{-1}=a^{-1}(a^{i+1}b^{i+1})b^{-1}=a^ib^i$.
So, $(ab)^i=(ba)^i$.
$(ba)^{i+1}=a^{-1}(ab)^{i+2}b^{-1}$
Here's the problem. Because we don't have $i+2$ as consecutive integer for $i$ and $i+1$. So we can't continue the prove and it's not true.
Do I have the true idea for it?