3

Problem: Determine all the possible positive integer $n$,such that $3^n+n^2+2019$ is a perfect square.

My approach: At first I used guessing and checking. By that I found $n=4$. Then, I tried more values of $n$ and got no result. Then, I was pretty sure that there is no solution for $n>4$. But, I have to prove it. Then, I observed that $n$ has to be even. then, I tried to prove there is no solution for $n>4$. I used induction but failed.

Conclusion: How to solve this? It's a math contest practice problem. I am preparing for math contest. I was quite upset because after $2$ years of training, I can't solve it. Is this question junior standard(grade $6$ to $8$)? If yes then will it be eligible for regional round or national round? Any suggestion is appreciated.

2 Answers2

1

We define $f: \mathbb{N}\to \mathbb{N}$ as:

$f(n) =3^n+n^2+2019$

Lemma 1. if $x$ is square then $x \equiv 1 $ (mod 4) or $x \equiv 0$ (mod4).

Proof. $r = 2k \Rightarrow r^2\equiv 0$(mod 4) $r = 2k+1 \Rightarrow r^2\equiv 1$(mod 4) .$\square$

Proposition 1. if $f(n)$ is square then $ n = 2k $.

Proof.$f(2k+1) = 3^{2k+1}+(2k+1)^2+2019\equiv 3+1+3 \equiv 3 $ (mod 4) $f(2k) = 3^{2k}+(2k)^2+2019\equiv 1+0+3 \equiv 0 $ (mod 4).$\square$

Theorem 1 . For $k\ge 4$ then $3^{2k}< f(2k) < (3^k +1)^2$

Proof. it is clear that $ 3^{2k} < 3^{2k} + (2k)^2 + 2019 $ now we proof $f(2k) < (3^k +1)^2$ by induction:

$$ k =4 : f(2k) = 3^{2k}+(2k)^2+2019 < 3^{2k} + 2\cdot 3^{k} +1 \Leftrightarrow (2k)^2+2019< 2\cdot 3^{k} +1 $$

$$(2k)^2+2019 = 8^2 +2019 < 80\cdot 80 = 6400 < 81^2 + 1< 2\cdot 3^{k} +1 $$

so for $k = 4 $ it is correct now assume for $k $ it's true for $k+1 $ we have:

$$ f(2k+2) < 3^{2k} + 2\cdot 3^{k} +1 \Rightarrow (3^{k+2} +1)^2 > 9(3^{2k} + 2\cdot 3^{k} )+ 1 > 9(3^{2k}+(2k)^2+2018)+1 $$

$$ \Leftrightarrow (3^{k+2} +1)^2> 3^{2(k+1) } +9 (2k)^2+2019 $$

and it is obvious that $ 9 (2k)^2 = 36k^2>16k^2 = 4k^2 + 8k^2 + 4k^2 > 4k^2 + 4k+4 = (2k+2) ^2$

So we got:

$$ (3^{k+2} +1)^2 >3^{2(k+1) } + (2k+2)^2+2019$$.$\square$

Know we should check $n\in \{2,4,6\}$ because by Theorem 1 we proof that if $n \in \{8,10,12 ,\cdots\}$ then $f(n)$ is between two consecutive squares so it can't be square now we have:

$n =2 : 45^2 = 2025< f(2) = 2032 < 2116 = 46^2$

$n= 4 : f(4) = 2116= 46^2$ it is square

$n =6 : 45^2 = 52^2 = 2704< f(2) = 2784 < 2809 = 53^2$

So just if $n =4$ then $f(n) $ is square!

0

$3^n$ is much more larger than $n^2$ if n is large enough, so we can think that if $3^n$ is square then $3^n+n^2+1$ won't be square since it will be less then $(3^{n/2}+1)^2$. Let's say $m^2=3^n+n^2+2019$, and suppose that n is odd. Then $m^2 \equiv -1+1+3 \equiv 3 (mod 4)$, and this is a contradiction. Thus n is even, and we can say n=2k. Since $(3^k)^2 < m^2 < (3^k+1)^2=3^n+2\times3^k+1$ if $k \geq 7$, so k must be less than 7, and we have to check all cases to find n.

  • k=6 : $m^2=3^{12}+2163 \Rightarrow (3^6+1)^2<m^2<(3^6+2)^2$
  • k=5 : $m^2=3^{10}+2119 \Rightarrow (3^5+4)^2<m^2<(3^5+5)^2$
  • k=4 : $m^2=8644, 92^2=8464, 93^2=8649$
  • k=3 : $m^2=2784, 52^2=2704, 53^2=2809$
  • k=2 : $m^2=2116=46^2$
  • k=1 : $m^2=2032, 45^2=2025, 46^2=2116$

Finally,the solution is n=2.