Maths Olympiad Prep

Track / Stage 7 / 29 of 300 #1429 of 1964

Problem 1429

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.0 Prove it

Let aa and dd be two positive integers. Prove that there exists a constant KK such that every set of KK consecutive elements of the arithmetic progression {a+nd}n=1\{a+nd\}_{n=1}^\infty contains at least one number which is not prime.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Official solution

1. **Case 1: aa and dd are not coprime**

- If aa and dd are not coprime, then gcd(a,d)=g>1\gcd(a, d) = g > 1.
- Every term in the arithmetic progression {a+nd}n=1\{a + nd\}_{n=1}^\infty can be written as a+nda + nd.
- Since gg divides both aa and dd, it follows that gg divides a+nda + nd for all nn.
- Therefore, each term a+nda + nd is divisible by gg and is greater than gg (since aa and dd are positive integers and n1n \geq 1).
- Hence, every term a+nda + nd is not prime because it has a divisor g>1g > 1.
- Thus, K=1K = 1 works in this case, as every single element in the progression is not prime.

2. **Case 2: aa and dd are coprime**

- If aa and dd are coprime, then gcd(a,d)=1\gcd(a, d) = 1.
- Consider any dd consecutive terms in the arithmetic progression: a+nd,a+(n+1)d,,a+(n+d1)da + nd, a + (n+1)d, \ldots, a + (n+d-1)d.
- These terms can be written as a+nd,a+(n+1)d,,a+(n+d1)da + nd, a + (n+1)d, \ldots, a + (n+d-1)d.
- Since dd is coprime with aa, the numbers a,a+d,a+2d,,a+(d1)da, a+d, a+2d, \ldots, a+(d-1)d are all distinct modulo dd.
- This means that among any dd consecutive terms, there is exactly one term that is congruent to 0(modd)0 \pmod{d}.
- Specifically, there exists an integer kk such that a+kd0(modd)a + kd \equiv 0 \pmod{d}, which implies a+kd=mda + kd = md for some integer mm.
- Since aa and dd are coprime, mm must be greater than 11 (as a+kda + kd is greater than dd).
- Therefore, a+kda + kd is not prime because it is divisible by dd and greater than dd.
- Thus, K=dK = d works in this case, as among any dd consecutive terms, there is at least one term that is not prime.

Conclusion:
In both cases, we have shown that there exists a constant KK such that every set of KK consecutive elements of the arithmetic progression {a+nd}n=1\{a + nd\}_{n=1}^\infty contains at least one number which is not prime. Specifically, K=1K = 1 if aa and dd are not coprime, and K=dK = d if aa and dd are coprime.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.