Let $p$ and $q$ be prime numbers such that $p^2+pq+q^2$ is perfect square. Prove that $p^2-pq+q^2$ is prime
Problem
Source: Regional Olympiad - Federation of Bosnia and Herzegovina 2018
Tags: number theory, prime numbers, Perfect Square
19.09.2018 12:18
gobathegreat wrote: Let $p$ and $q$ be prime numbers such that $p^2+pq+q^2$ is perfect square. Prove that $p^2-pq+q^2$ is prime It was here. Please use the search function.
22.10.2024 17:21
$p^2+pq+q^2=a^2$ $p^2+pq+q^2=(p+q)^2-pq=a^2$ $\Longrightarrow$ $(p+q-a)(p+q+a)=pq$ case 1) $p+q-a=p$ and $p+q+a=q$ however that is contratition. case 2) $p+q-a=1$ and $p+q+a=pq$ then $ 2p+2q=pq+1$ $\Longrightarrow$ $(p-2)(q-2)=3$ WLOG : $p=5 , q=3$ $p^2-pq+q^2=25-15+9=19$ so 19 is prime number
01.01.2025 16:31
p²+pq+q²=a² >> (p+q-a)(p+q+a)=pq Case 1: p+q-a=p,p+q+a=q >>p+q=0 this is contradiction Case 2.similarly p+q=pq+1. (p-2)(q-2)=3 we get p=3;q=5 p²-pq+q²=19 that is prime.We are done.
01.01.2025 23:58
So i'm in 9th grade and it's normal problem it took me 10 minutes but not bad Solution: Wlog $p\geq q$ $p^2+pq+q^2=k^2$ $p^2+2pq+q^2=k^2+pq$ $(p+q)^2=k^2+pq$ $(p+q)^2-k^2=pq$ $(p+q+k)(p+q-k)=pq$ $p+q+k>p\implies p+q+k=pq$(1) and $p+q-k=1$ $k=p+q-1$ plug this in (1) we get $2p+2q-1=pq\implies p=\frac{2q-1}{q-2}$ $q-2|2q-1$ so $q-2|2q-1-2(q-2)=3$ Since $p\geq q\implies q-2=1\implies q=3$ and $p=5$ $p^2+pq+q^2=49=7^2$ and $p^2-pq+q^2=19$