Determine all the possible positive integer $n,$ such that $3^n+n^2+2019$ is a perfect square.
Problem
Source: 2019 China Western Mathematical Olympiad P1
Tags: number theory, Perfect Square
donot
13.08.2019 10:35
If $n$ is odd, the expression is $3\pmod 4$, so $n$ is even. Let $n = 2k$.
Then $9^k + 4k^2 + 2019$ is a perfect square.
Therefore, $9^k + 4k^2 + 2019\geq (3^k + 1)^2 = 9^k + 2\cdot 3^k + 1$.
So $4k^2 + 2018\geq 2\cdot 3^k\rightarrow k\leq 6$.
Computation gives that $4$ is the only solution.
In order to reduce computation, note that $k\neq 5$ since the expression is then $3\pmod 5$, and $k\neq 6$, since then the expression divides $3$ but not $9$.
AlastorMoody
08.10.2019 11:19
CWMI 2019 P1 wrote:
Determine all the possible positive integer $n,$ such that $3^n+n^2+2019$ is a perfect square.
Solution: Firstly, $n=1,2$ give no solutions.
$$3^n+n^2+2019=k^2$$Notice: $k^2 \equiv n^2 \equiv 0,1 \pmod{3}$. If $0 \pmod{3}$, then $2 \le v_3(n^2), v_3 (k^2)$, but $v_3(2019)=1$ $\implies$ contradiction! Hence, $k^2$ $\equiv$ $n^2$ $\equiv$ $1$ $\pmod{3}$. Next, taking $\pmod{4}$ $\implies$ $(-1)^n+n^2+3$ $\equiv$ $k^2 \pmod{4}$. If $n$ is odd, gives contradiction! hence, $n,k$ are even.
$$3^n=(3^{n/2})^2<3^n+n^2+2019<3^n+2 \times 3^{n/2} < (3^{n/2}+1)^2$$Which is true for $n \geq 14$. Checking, for $3 \le n \le 13$ $\implies$ $\boxed{n=4} \qquad \blacksquare$
hellnish
19.03.2023 09:56
donot wrote:
If $n$ is odd, the expression is $3\pmod 4$, so $n$ is even. Let $n = 2k$.
Then $9^k + 4k^2 + 2019$ is a perfect square.
Therefore, $9^k + 4k^2 + 2019\geq (3^k + 1)^2 = 9^k + 2\cdot 3^k + 1$.
So $4k^2 + 2018\geq 2\cdot 3^k\rightarrow k\leq 6$.
Computation gives that $4$ is the only solution.
In order to reduce computation, note that $k\neq 5$ since the expression is then $3\pmod 5$, and $k\neq 6$, since then the expression divides $3$ but not $9$.
nice
ismayilzadei1387
27.06.2023 14:47
typical bound
CrazyInMath
24.07.2023 17:00
Take mod $4$ gives you $n$ even, so let $n=2k$.
Now the expression becomes $9^k+4k^2+2019=x^2$
As we have the expression being larger than $9^k$, it can’t be square if it’s smaller than $(3^k+1)^2$.
So we have $2\cdot 3^k+1\leq 4k^2+2019$, so $k<7$.
$k=1,4$ fails by checking. $k=3,6$ failed by computing $v_3$, $k=5$ fails by mod $5$, and $k=2$ works.
sami1618
25.02.2024 00:28
For $n=8$ I think modulo $7$ works.
Aiden-1089
04.03.2024 13:29
If $n$ is odd, then taking mod 4 gives $3^n+n^2+2019 \equiv 3$, which is not possible. So $n$ is even, and write $n=2k$. $(3^k)^2<3^{2k}+4k^2+2019 \implies (3^k+1)^2 \leq 3^{2k}+4k^2+2019 \implies 3^k \leq 2k^2+1009$. Induction on $k$ shows that $k \geq 7$ is not possible, and checking $k=1,2,3,4,5,6$ yields $n=4$ as the only solution, with $3^4+4^2+2019=46^2$.
hanulyeongsam
19.10.2024 17:04
AlastorMoody wrote:
CWMI 2019 P1 wrote:
Determine all the possible positive integer $n,$ such that $3^n+n^2+2019$ is a perfect square.
Solution: Firstly, $n=1,2$ give no solutions.
$$3^n+n^2+2019=k^2$$Notice: $k^2 \equiv n^2 \equiv 0,1 \pmod{3}$. If $0 \pmod{3}$, then $2 \le v_3(n^2), v_3 (k^2)$, but $v_3(2019)=1$ $\implies$ contradiction! Hence, $k^2$ $\equiv$ $n^2$ $\equiv$ $1$ $\pmod{3}$. Next, taking $\pmod{4}$ $\implies$ $(-1)^n+n^2+3$ $\equiv$ $k^2 \pmod{4}$. If $n$ is odd, gives contradiction! hence, $n,k$ are even.
$$3^n=(3^{n/2})^2<3^n+n^2+2019<3^n+2 \times 3^{n/2} < (3^{n/2}+1)^2$$Which is true for $n \geq 14$. Checking, for $3 \le n \le 13$ $\implies$ $\boxed{n=4} \qquad \blacksquare$
good solution. I like that you used SANDWICH