Solve $x^2-2^y=2021$ for $x,y\in\mathbb{N}$

954 Views Asked by At

I have this equation to solve $x^2-2^y=2021, x,y \in N$ I was thinking of seeing it as a Diophantine equation, but it doesn't seem very logical

3

There are 3 best solutions below

1
On

Hint:

Look at the equation modulo $8$

0
On

$$2^y = x^2-2021$$ As noted by @J.W. Tanner, $(x,y)=(45,2)$ is a solution. Notice the RHS must be even, and so $x$ must be odd with $x=2k+1, k\in \mathbb N \cup \{0\}$. Replacing $x$, we have $$2^{y-2}= k^2+k-505=k(k+1)-505$$ Now, $k(k+1)$ is always even which means $k(k+1)-505$ is always odd. So, the only hope of a solution is when $k^2+k-505=2^0=1$, but then that corresponds to the case $y=2$. There is only one solution.

0
On

Someone in the comments pointed out $y=2$ as an solution, and I will show that that is the only solution: because $y$ is a natural number, $2^y$ is even, and since $2021$ is odd, $2021+2^y$ is odd. From there we can deduce that $x$ must also be odd, so we can substitute it for $2k+1$, where $k∈N$. The equation then becomes: $$(2k+1)^2=2021+2^y$$ simplifying: $$4(k^2+k)=2020+2^y$$ If we look at the terms, all of them have a factor of 4, with the possible exception of $2^y$. However, because it is a power of 2, we can just test both $y=1$ and $y=2$, and we can divide everything by 4 and substitute $y$ for $m$ where $m∈N$ and $m=y-2$: $$k^2+k=505+\frac{2^y}{4};m=y-2$$ $$k^2+k=505+2^m;m=y-2$$ Notice that the RHS is now odd, because an even number added to an odd number is always odd. Also notice that the quantity $k^2+k$ will never be odd, because: if $k$ was odd, then $k^2$ will also be odd, and so $k^2+k$ will be even, if $k$ was even, then both $k^2$ and $k$ will be even, and so $k^2+k$ will be still even. Since RHS is odd and LHS is even, they cannot be equal, if $m > 0$, consequently $y<3$.

When we earlier tested $y=1$ and $y=2$, we should have seen that $y=2$ is a possible solution, with $(x, y) = (45, 2)$. Previously we also saw that $y$ must be lesser than 3, so the only solution is $(x, y) = (45, 2)$.