<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] Note that $k^2 < k(k+1) = 4^{x+y}+4^x < (2^{x+y}+2^x)^2$, i.e. $k < 2^{x+y}+2^x$, 
and that $(2^{x+y})^2 < 4^{x+y}+4^x = k(k+1) < (k+1)^2$, i.e. $2^{x+y}-1 < k$. 
Since $2^x$ divides $4^x(4^y+1)$, either $2^x$ divides $k$, or $2^x$ divides $k+1$. 
If $k$ is a multiple of $2^x$, then since $2^{x+y}-1 < k < 2^{x+y}+2^x$, we must have $k = 2^{x+y}$.
Then, $4^{x+y}+4^x = k(k+1) = 2^{x+y}(2^{x+y}+1) = 4^{x+y}+2^{x+y}$. Solving yields $x = y$. 
If $k+1$ is a multiple of $2^x$, then since $2^{x+y} < k+1 < 2^{x+y}+2^x+1$, we must have $k+1 = 2^{x+y}+2^x$.
So, $4^{x+y}+4^x = k(k+1) = (2^{x+y}+2^x)(2^{x+y}+2^x+1) = 4^{x+y}+4^x+2^{2x+y+1}+2^{x+y}+2^x$, which is a contradiction since $2^{2x+y+1}+2^{x+y}+2^x > 0$. 
Therefore, if $x,y,k$ are positive integers such that $k(k+1) = 4^x(4^y+1)$, then $x = y$.
</s>