Let $p,q$ be prime numbers$.$ Prove that if $p+q^2$ is a perfect square$,$ then $p^2+q^n$ is not a perfect square for any positive integer $n.$
Problem
Source: ITAMO 2019 #2
Tags: number theory, ITAMO 2019
03.05.2019 19:31
Let $a \in \mathbb{N}$ such that \[ p + q^2 = a^2 \]\[ p = a^2 - q^2 = (a - q)(a + q) \]As $p$ is a prime and $a + q > a - q$, then $a - q = 1$. We must have $p = 2q + 1$. Suppose that there exists $b \in \mathbb{N}$ such that for some positive integer $n$, then \[ p^2 + q^n = b^2 \]\[ q^n = b^2 - p^2 \]\[ q^n = (b - p)(b + p) \]Notice that $GCD(b - p, b + p) | 2p = 4q + 2$. But we have both $b - p$ and $b + p$ to be the power of $q$. So, we must have either $b - p = 1$ or $q = 2$. If $b - p = 1$, then $q^n = (p + 1)^2 - p^2 = 2p + 1 = 4q + 3$. It is easy to prove that $n$ has to be odd and $q^n \ge 4q + 3$ for $q,n \ge 3$. If $q = 2$, then we must have $p = 5$, $2^n = (b - 5)(b + 5)$. If $b - 5 = 1$, then it clearly doesn't satisfy. So, we must have $b - 5 = 2$, which dont satisfy as well. In either case, we're finished.
14.02.2023 13:23
Here is my solution: https://calimath.org/pdf/ITAMO2019-2.pdf And I uploaded the solution with motivation to: https://youtu.be/4KXpLbCxjaU