Given two primes $p$ and $q$, show that there always exists an $x$ such that only one of $p+x$ and $q+x$ is prime

Elementary solution 1

WLOG suppose that $p < q$. Let $q = p + k$ for some positive integer $k$.

Now consider $x=k$, so $$\{p+x,q+x\} = \{q,q+k\}$$ If $q+k$ is not prime then we are done, since $q$ is prime. Otherwise we get a new set of primes $$ \{p',q'\} = \{q,q+k\} $$ and we can repeat the process by adding $k$.

Each time round the new $p'$ is necessarily prime, so this will only fail if we can produce $q'$ that is prime forever.

However at the $q$-th iteration this must fail since $$ \{p+x,q+x\} = \{p+qk,q+qk\} = \{p+qk,q(1+k)\} $$ and $q(1+k)$ is not prime.


Solution 2:

Let $x=dq,d\geq 1$ so that $q+x$ is never prime. Then one of $p+x$ is prime by Dirichlet's theorem on arithmetic progression.


Lemma: There exist arbitrarily long chains of consecutive composite natural numbers.

Proof: Let $n>2$ be given. For each $2\le k\le n$, $n!+k$ is obviously divisible by $k$. Therefore, every natural number from $n!+2$ through $n!+n$ is composite. Since $n$ was arbitrary, you can make consecutive composite chains as long as you like.


Now, we return to the problem given above. Without loss of generality, assume $p<q$. Consider some chain of at least $(q-p)$ consecutive composite numbers, and let $N$ be the largest prime number less than the members of that chain.

Then $p+(N-p)$ is prime and $q+(N-p)$ is composite, since $p+(N-p)=N$ which was given to be prime and $q+(N-p)=N+(q-p)$ is either in the chain of composite numbers that we considered or between N and the start of that chain.