Find all $n$ such that $n^2+3^n$ is a square number

140 Views Asked by At

Find all $n$ such that $n^2+3^n$ is a square number .

2

There are 2 best solutions below

0
On

Hint:

Write $3^n+n^2=m^2$ ($m>n$), then we have $3^n=(m-n)(m+n)$, thus both $n-m$ and $n+m$ must be powers of 3.

Therefore $n+m \geq 3(m-n)$ since they are different. This gives $4n \geq 2m$ or $2n \geq m$

But this gives $3^n+n^2 = m^2 \leq 4n^2$. So there are only few values for $n$ possible.

3
On

Note that $n = 1$ and $n = 3$ are solutions (the squares are $1$ and $36$ respectively). I will prove that there are no more.

Write $$ n^2 + 3^n = m^2 \implies 3^n = m^2-n^2 = (m+n)(m-n) $$ which means that both $(m+n)$ and $(m-n)$ is a power of $3$, say $m+n = 3^i, m-n = 3^j$. We then have $i+j = n$, and $3^i - 3^j = 2n$. As you might suspect, the difference between powers of $3$ quickly becomes so large that this is impossible.

To be more exact, pick two integers $i, j$ such that $0 < j < i < n$ and $i + j = n$. Then we have $$2n = 3^i - 3^j = 3^j(3^{i-j} + 1) = 3^j(3^{n-2j} + 1) \geq 3^j \cdot 3^{n-2j} = 3^{n-j} \geq 3^{n/2}\\ 4n^2 \geq 3^n$$ which just isn't true for $n \geq 4$, and therefore there can be no more solutions.