Problem

Source: All-Russia 2018 Grade 9 P1

Tags: number theory, algebra, prime, prime numbers



Suppose $a_1,a_2, \dots$ is an infinite strictly increasing sequence of positive integers and $p_1, p_2, \dots$ is a sequence of distinct primes such that $p_n \mid a_n$ for all $n \ge 1$. It turned out that $a_n-a_k=p_n-p_k$ for all $n,k \ge 1$. Prove that the sequence $(a_n)_n$ consists only of prime numbers.