Olympiad Maths Prep

Track / Stage 8 / 41 of 180 #1741 of 2000

Problem 1741

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.1 Prove it BxMO Team Selection Test, March 2020 · Netherlands · 2020

For an integer n3n \ge 3 we consider a circle containing nn vertices. To each vertex we assign a positive integer, and these integers do not necessarily have to be distinct. Such an assignment of integers is called *stable* if the product of any three adjacent integers is nn. For how many values of nn with 3n20203 \le n \le 2020 does there exist a stable assignment?

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Suppose nn is not a multiple of 3 and that we have a stable assignment of the numbers a1,a2,,ana_1, a_2, \dots, a_n, in that order on the circle. Then we have aiai+1ai+2=na_i a_{i+1} a_{i+2} = n for all ii, where the indices are considered modulo nn. Hence,
ai+1ai+2ai+3=n=aiai+1ai+2, a_{i+1} a_{i+2} a_{i+3} = n = a_i a_{i+1} a_{i+2},
which yields ai+3=aia_{i+3} = a_i (as all numbers are positive). Through induction, we find that a3k+1=a1a_{3k+1} = a_1 for all integers k0k \ge 0. Because nn is not a multiple of 3, the numbers 3k+13k+1 for k0k \ge 0 take on all values modulo nn: indeed, 3 has a multiplicative inverse modulo nn, hence k31(b1)(modn)k \equiv 3^{-1} \cdot (b-1) \pmod{n} implies 3k+1b(modn)3k+1 \equiv b \pmod{n} for all bb. We conclude that all numbers on the circle must equal a1a_1. Hence, we have a13=na_1^3 = n, where a1a_1 is a positive integer. Hence, if nn is not a multiple of 3, then nn must be a cube.

If nn is a multiple of 3, then we put the numbers 1,1,n,1,1,n,1, 1, n, 1, 1, n, \dots in that order on the circle. In that case, the product of three adjacent numbers always equals 11n=n1 \cdot 1 \cdot n = n. If nn is a cube, say n=m3n = m^3, then we put the numbers m,m,m,m, m, m, \dots on the circle. In that case, the product of three adjacent numbers always equals m3=nm^3 = n.

We conclude that a stable assignment exists if and only if nn is a multiple of 3, or a cube. Now we have to count the number of such nn. The multiples of 3 with 3n20203 \le n \le 2020 are 3,6,9,,20193, 6, 9, \dots, 2019; these are 20193=673\frac{2019}{3} = 673 numbers. The cubes with 3n20203 \le n \le 2020 are 23,33,,1232^3, 3^3, \dots, 12^3, because 123=1728202012^3 = 1728 \le 2020 and 133=2197>202013^3 = 2197 > 2020. These are 11 cubes, of which 4 are divisible by 3, hence there are 7 cubes which are not a multiple of 3. Altogether, there are 673+7=680673 + 7 = 680 values of nn satisfying the conditions. \square

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.