P2 italian math olympiad 2019

150 Views Asked by At

Show that if $p + q^2$ is a perfex square then $p^2+q^n$ isn't a perfec square for all $n$ natural number, wher $p,q$ are prime number

My solution

$p+q^2=x^2 \Longleftrightarrow p=(x-q)(x+q)\Longleftrightarrow x-q=1$, because p is prime. So we have:

$x-q=1$ $(1)$

$x+q=p$ $(2)$

Now suppose the for some integer $l$ we have

$p^2 + q^n = l^2 \Longleftrightarrow q^n=(l-p)(p+l)$. Suppose $q$ odd then if $(l-p)\neq 1$, we must have $q|(l-p),(l+p) $ (because $(l-p)(l+p)$ is a power of q) and so we have $l \equiv p \equiv (-l) (mod$ $ q)$, that is a contraddiction for odd number. So $q$ odd implies $l-p=1$. So $q^n= p+l=2p+1\equiv 3 \equiv 0 (mod $ $q)$ because $p \equiv x (mod $ $ q)$ for $(2)$ that is $1 (mod $ $ q)$ for $(1)$. So $q= 3$ if $q$ odd prime because $3 \equiv 0 (mod q)$. If q even implies $q=2$. For $q=3$, $p=7$ for $(2)$ and $(1)$. So $7^2 + 3^n =l^2 \Longleftrightarrow 3^n= (l-7)(l+7)$ that has no solution modulo $3$. For $q=2$ we have $2^n = (l-5)(l+5)$ that has no solution modulo 4. So there are no no solution.

This solution is different from official solution. Can someone tell me if there are any errors or if it is correct?