<s>[INST] For positive integers $x, y, k$, prove that $4^x (4^y+1)=k(k+1)$ implies $x = y$ In the proof that I read, even $k$ implies $4^x=k$ and $4^y+1=k+1$. I am wondering why we don't need to factorize $4^y+1$ into $pq$, such that $p, q > 1$, and solve for $4^x p=k$, $q=k+1$.
 [/INST] Since either $k$ or $k + 1$ is even, and the other is odd, then $k = 4^x$ or $k + 1 = 4^x$. Assuming the latter for sake of contradiction, this implies that $k \equiv -1 \mod 4$, but also that $k = 4^y + 1$. This is a contradiction, so $k = 4^x$.
Therefore $k + 1 = 4^y + 1 = 4^x + 1$, hence $4^x = 4^y \implies x = y$.
</s>