2000 JBMO Problems/Problem 2

Problem 2

Find all positive integers $n\geq 1$ such that $n^2+3^n$ is the square of an integer.


Solution

After rearranging we get: $(k-n)(k+n) = 3^n$

Let $k-n = 3^a, k+n = 3^{n-a}$

we get: $2n = 3^a(3^{n-2a} - 1)$ or, $(2n/(3^a)) + 1 = 3^{n-2a}$

Now, it is clear from above that $3^a$ divides $n$. so, $n \geq 3^a$


If $n = 3^a, n - 2a = 3^a - 2a \geq 1$ so $RHS \geq 3$ But $LHS = 3$

If $n > 3^a$ then $RHS$ increases exponentially compared to $LHS$ so $n$ cannot be $> 3^a$.

Thus $n = 3^a$.

Substituting value of $n$ above we get:

$3 = 3^{3^a - 2a}$

or $3^a - 2a = 1$ this results in only $a = 0$ or $a = 1$

Thus $n = 1$ or $3$.

~Kris17

Solution 2 (credit to dskull16)

n = 1 is an obvious solution but are there any more? We require that $n^2 + 3^n = (n+k)^2$ for some k in the naturals. Using difference of two squares and realising that the factor pairs can only be a power of 3, we get that $2n+k = 3^{n-j}, k = 3^j$ which gives us $2n = 3^{n-j} - 3^j$. While we could consider induction on j to prove that $3^{n-j} - 3^j > 2n$, we could instead consider the difference between $3^n$ and all the powers of 3 preceding it. The smallest difference between the nth power of 3 and any other power of 3 before it is trivially the n-1th power of 3 so it suffices to show that: $3^n - 3^{n-1} > 2n$ for $n > 1$, which simplifies to $2\cdot 3^{n-1} > 2n$ and hence $3^{n-1} > n$ which is trivially true $\forall n > 1$. Hence there are no further solutions.