Find the natural number n such that $13^n+7n+13$ is a perfect square.
I am assuming the above expression is a perfect square and am trying to factor it but have not been able to
Find the natural number n such that $13^n+7n+13$ is a perfect square.
I am assuming the above expression is a perfect square and am trying to factor it but have not been able to
A technique for this kind of question is to show that for large enough $n$, your expression is strictly between two consecutive squares and therefore cannot be square. Then manually check the small values of $n$.
We have that $n$ must be even, or else the whole thing is $5$ mod $7$, which is not a square. So $n=2k$ and $$\left(13^k\right)^2+14k+13=a^2$$
But $$\left(13^k\right)^2\lt\left(13^k\right)^2+14k+13\lt\left(13^k\right)^2+2\cdot13^k+1=\left(13^k+1\right)^2$$
The middle inequality is true iff $14k+13\lt2\cdot13^k+1$. In other words for all $k\geq2$. So for all $k\geq2$, $\left(13^k\right)^2+14k+13$ is strictly between two consecutive squares, and cannot be square.
It remains to check what happens when $k=1$.
Lets assume it equals some perfect square $k^2$, $k\in \mathbb{N}$,
$$13^n + 7n + 13 = k^2$$
First, $n$ must be even since
$$ 13^n + 7n + 13 \equiv 6^n + 6 \mod 7, $$
if $n$ is odd then,
$$ \begin{align} 6^n + 6 &\equiv 12 \mod 7 \\ &\equiv 5 \mod 7 \end{align} $$
which can never be a square number since $k^2 = 0, 1, 2, 4 \mod 7$. Thus, we don't have to worry about having $13^n$ be almost a perfect square since if $n$ is even, $13^n$ is always a square.
Next, for larger values of $k$, consecutive perfect squares get farther apart, specifically
$$(k + 1)^2 = k^2 + 2k + 1 \\ (k - 1)^2 = k^2 - 2k + 1$$
so the nearest perfect square to $k$ is $\pm 2k + 1$.
Next, notice that for larger values of $n$, $13^n$ grows much faster than $7n + 13$, so
$$k^2 \approx 13^n, \\ k \approx \sqrt{13^n}.$$
So if $k^2$ were close to $13^n$, the nearest perfect square would be $\approx \pm 2\sqrt{13^n}$ which, for values of $n > 2$, is larger than $7n + 13$.
Testing $n \leq 2$ shows that the only solution is $n = 2$ in which
$$13^2 + 7\times 2 + 13 = 196 = 14^2$$