# Arithmetic sequences

I am learning about arithmetic progressions and I came across the question: "Prove that there is no infinite arithmetic sequence whose terms are all prime numbers."

I can see that there is no constant difference between all the prime numbers and hence an arithmetic sequence consisting only of prime numbers can't exist. However, I am unsure about how to prove this mathematically.

• Terms in an arithmetic progression have the form $na+b$ for constants $a$ and $b$. $a$ and $b$ have a common factor, or they are coprime. Consider these two cases separately.
– MJD
Commented Jan 30, 2017 at 11:27
• math.stackexchange.com/questions/251258/… Commented Jan 30, 2017 at 11:44
• You don't need all the primes to be in it.
– user645636
Commented Jan 1, 2020 at 2:32

• and the $p+nd+n+1$ th term is divisible by the $n+1$ th in general.
Here’s another proof. Suppose otherwise, and take an arithmetic progression with only primes. Let its first term be $$n$$, and its common difference be $$d$$. Take a prime $$p>d$$. There exists an integer $$a$$ such that $$p\mid da+n,$$ namely, $$n$$ times the modular inverse of $$-d$$. Therefore, $$d(p+a)+n$$ will be a multiple of $$p$$ bigger than $$p$$ in the progression, and we’re done.