Let $p>q$ be primes, such that $240 \nmid p^4-q^4$. Find the maximal value of $\frac{q} {p}$.
Problem
Source: Bulgarian Winter Tournament 2024 9.2
Tags: number theory
28.01.2024 13:35
Lemma 1: If $a$ is a prime number and $a>5$, then $240\mid a^4-1$. Lemma 2: If $p>q>5$, then $240\mid p^4-q^4$ (which is true since $240\mid p^4-1$ and $240\mid q^4-1$). Back to the problem, from Lemma 2 we must have $q\leq5\Rightarrow q\in\{2,3,5\}$, and it's easy to find the maximal value of $\frac{q}{p}$.
28.01.2024 17:14
Let's also prove these lemmas. Note that $240=16\cdot 3\cdot 5$. Suppose $p,q\notin\{2,3,5\}$. Then $p^4\equiv q^4\equiv 1\pmod{5}$ by Fermat and $p^4\equiv q^4\equiv 1\pmod{4}$. As for the modulo 16, observe that $p^4-q^4=(p-q)(p+q)(p^2+q^2)$. Now, $p^2+q^2\equiv 2\pmod{4}$, and moreover, $p-q\equiv p+q+2\pmod{4}$. So, exactly one of $p-q$ and $p+q$ is divisible by $4$, hence $16\mid p^4-q^4$. With this, at least one of $p,q$ must be in $\{2,3,5\}$, the rest is easy.
27.11.2024 08:10
This can be done by grade 2 or 3 concepts. Let, \[ \frac{q}{p} = r \quad \text{where } r < 1 \]\[ \frac{q + p}{p - q} = \frac{r + 1}{1 - r} \]The ratio $\frac{q}{p}$ is maximum when $(p - q)$ is minimum, i.e., $1$. Since both are primes, the only possible pair $(p, q)$ is $(3, 2)$. \[ \therefore \text{Maximum value of } \frac{q}{p} \text{ is } \frac{2}{3}. \]