Maths Olympiad Prep

Library / /38 of 46

, 2022

Combinatorics Difficulty 7.1 National Olympiad, round 2 Prove it Japan

How many permutations (p1,p2,,p1000)(p_1, p_2, \dots, p_{1000}) of {1,2,,1000}\{1, 2, \dots, 1000\} are there such that pip_i is a multiple of ii for any 1i9991 \le i \le 999?

Solution

Let S={1,2,,1000}S = \{1, 2, \dots, 1000\}. We want to find the number of bijective functions f:SSf: S \to S such that f(i)f(i) is a multiple of ii for any 1i9991 \le i \le 999. Denote fk(i)=f(f(f(i)))k timesf^k(i) = \underbrace{f(f(\dots f(i)\dots))}_{k \text{ times}}.

Consider the sequence {1000,f(1000),f2(1000),}\{1000, f(1000), f^2(1000), \dots\}. Since SS is finite, there exists a pair of positive integers (i,j)(i, j) with i<ji < j and fi(1000)=fj(1000)f^i(1000) = f^j(1000). Since ff is injective we have fji(1000)=1000f^{j-i}(1000) = 1000, thus there exists a positive integer mm such that fm(1000)=1000f^m(1000) = 1000. Let ll be the smallest such positive integer.

We will show that f(1000),f2(1000),,fl(1000)=1000f(1000), f^2(1000), \dots, f^l(1000) = 1000 are distinct. Assume that there exists a pair of integers (s,t)(s, t) such that fs(1000)=ft(1000)f^s(1000) = f^t(1000) and 1s<tl1 \le s < t \le l. Then we have fs(1000)=ft(1000)=fs(fts(1000))f^s(1000) = f^t(1000) = f^s(f^{t-s}(1000)) and the injectivity of ff shows fts(1000)=1000f^{t-s}(1000) = 1000, which contradicts the minimality of ll since 0<ts<l0 < t-s < l. Therefore f(1000),f2(1000),,fl(1000)=1000f(1000), f^2(1000), \dots, f^l(1000) = 1000 are distinct. In particular, f(1000),f2(1000),,fl1(1000)f(1000), f^2(1000), \dots, f^{l-1}(1000) is not equal to 1000, thus fi+1(1000)f^{i+1}(1000) is a multiple of fi(1000)f^i(1000) for any integer il1i \le l-1.

Now let a1<a2<<aka_1 < a_2 < \dots < a_k be all positive integers less than or equal to 1000 which do not appear in {1000,f(1000),,fl1(1000)}\{1000, f(1000), \dots, f^{l-1}(1000)\}. Since f(1000),f2(1000),,fl(1000)f(1000), f^2(1000), \dots, f^l(1000) is a permutation of {1000,f(1000),,fl1(1000)}\{1000, f(1000), \dots, f^{l-1}(1000)\}, f(a1),f(a2),,f(ak)f(a_1), f(a_2), \dots, f(a_k) is a permutation of {a1,a2,,ak}\{a_1, a_2, \dots, a_k\} by the bijectivity of ff. Therefore we have

f(a1)+f(a2)++f(ak)=a1+a2++ak.() f(a_1) + f(a_2) + \dots + f(a_k) = a_1 + a_2 + \dots + a_k. \quad (*)

For any positive integers iki \le k we have ai1000a_i \ne 1000, thus f(ai)f(a_i) is a multiple of aia_i. In particular f(ai)aif(a_i) \ge a_i holds. This and (*) show that f(ai)=aif(a_i) = a_i for any positive integer iki \le k. It follows that there exists a sequence of positive integers d1<d2<<dl=1000d_1 < d_2 < \dots < d_l = 1000 such that di+1d_{i+1} is a multiple of did_i for any 1il11 \le i \le l-1 and
f(n)={di+1(n=di,1il1),d1(n=dl),n(otherwise). f(n) = \begin{cases} d_{i+1} & (n = d_i, 1 \le i \le l-1), \\ d_1 & (n = d_l), \\ n & \text{(otherwise)}. \end{cases}

Conversely, if there exists such a sequence d1<d2<<dld_1 < d_2 < \dots < d_l, ff satisfies the given condition. Therefore the problem is equivalent to count sequences of integers d1<d2<<dl=1000d_1 < d_2 < \dots < d_l = 1000 such that di+1d_{i+1} is a multiple of did_i for any 1il11 \le i \le l-1.

For a positive integer nn, let cnc_n be the number of sequences of positive integers d1<d2<<dl=nd_1 < d_2 < \dots < d_l = n such that di+1d_{i+1} is a multiple of did_i for any 1il11 \le i \le l-1.
It is clear that c1=1c_1 = 1. Let n2n \ge 2. If l=1l=1, such sequence is unique. If l2l \ge 2, dl1d_{l-1} must be a positive divisor of nn less than nn, and for any positive divisor m<nm < n of nn there exists cmc_m sequences satisfying the condition with dl1=md_{l-1} = m. Hence it follows that
cn=1+m<n, mncm. c_n = 1 + \sum_{m < n,\ m \mid n} c_m.

c1=1,c2=2,c4=4,c8=8,c5=2,c10=6,c20=16,c40=40,c25=4,c50=16,c100=52,c200=152,c125=8,c250=40,c500=152,c1000=504. \begin{align*} c_1 &= 1, & c_2 &= 2, & c_4 &= 4, & c_8 &= 8, \\ c_5 &= 2, & c_{10} &= 6, & c_{20} &= 16, & c_{40} &= 40, \\ c_{25} &= 4, & c_{50} &= 16, & c_{100} &= 52, & c_{200} &= 152, \\ c_{125} &= 8, & c_{250} &= 40, & c_{500} &= 152, & c_{1000} &= 504. \end{align*}

Hence the answer is c1000=504c_{1000} = 504.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.