Skip to main content

2022 AIME II Problem 5

Problem 5 of 15EasierNumber TheoryProblem-Solving Techniques

Twenty distinct points are marked on a circle and labeled 11 through 2020 in clockwise order. A line segment is drawn between every pair of points whose labels differ by a prime number. Find the number of triangles formed whose vertices are among the original 2020 points.

Your answer

Integer from 0 to 999
Show solution

Solution

A triangle has vertices i<j<ki \lt j \lt k where j−i,j - i, k−j,k - j, and k−ik - i are all prime. Since k−i=(j−i)+(k−j)k - i = (j - i) + (k - j) is a prime that is a sum of two primes, and the sum of two odd primes is even, one of the two smaller differences must equal 2.2. So the differences are {2,p}\{2, p\} in some order with pp and p+2p + 2 both prime: the twin prime pairs with p+2≤19p + 2 \le 19 are (3,5),(3, 5), (5,7),(5, 7), (11,13),(11, 13), and (17,19).(17, 19). For each pair, the middle vertex can be at distance 22 or at distance pp from the smallest, and the total span is p+2,p + 2, so there are 2(20−(p+2))2\bigl(20 - (p + 2)\bigr) triangles. This gives 2⋅15=30,2 \cdot 15 = 30, 2⋅13=26,2 \cdot 13 = 26, 2⋅7=14,2 \cdot 7 = 14, and 2⋅1=22 \cdot 1 = 2 for the four pairs. The total is 30+26+14+2=72.30 + 26 + 14 + 2 = 72.
AoPS wiki

Tagged: prime · parity · casework

More practice