CombinatoricsDifficulty 7.1Prove itJapan competition problems · Japan · 2022
How many permutations (p1,p2,…,p1000) of {1,2,…,1000} are there such that pi is a multiple of i for any 1≤i≤999?
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.
Let S={1,2,…,1000}. We want to find the number of bijective functions f:S→S such that f(i) is a multiple of i for any 1≤i≤999. Denote fk(i)=k timesf(f(…f(i)…)).
Consider the sequence {1000,f(1000),f2(1000),…}. Since S is finite, there exists a pair of positive integers (i,j) with i<j and fi(1000)=fj(1000). Since f is injective we have fj−i(1000)=1000, thus there exists a positive integer m such that fm(1000)=1000. Let l be the smallest such positive integer.
We will show that f(1000),f2(1000),…,fl(1000)=1000 are distinct. Assume that there exists a pair of integers (s,t) such that fs(1000)=ft(1000) and 1≤s<t≤l. Then we have fs(1000)=ft(1000)=fs(ft−s(1000)) and the injectivity of f shows ft−s(1000)=1000, which contradicts the minimality of l since 0<t−s<l. Therefore f(1000),f2(1000),…,fl(1000)=1000 are distinct. In particular, f(1000),f2(1000),…,fl−1(1000) is not equal to 1000, thus fi+1(1000) is a multiple of fi(1000) for any integer i≤l−1.
Now let a1<a2<⋯<ak be all positive integers less than or equal to 1000 which do not appear in {1000,f(1000),…,fl−1(1000)}. Since f(1000),f2(1000),…,fl(1000) is a permutation of {1000,f(1000),…,fl−1(1000)}, f(a1),f(a2),…,f(ak) is a permutation of {a1,a2,…,ak} by the bijectivity of f. Therefore we have
f(a1)+f(a2)+⋯+f(ak)=a1+a2+⋯+ak.(∗)
For any positive integers i≤k we have ai=1000, thus f(ai) is a multiple of ai. In particular f(ai)≥ai holds. This and (*) show that f(ai)=ai for any positive integer i≤k. It follows that there exists a sequence of positive integers d1<d2<⋯<dl=1000 such that di+1 is a multiple of di for any 1≤i≤l−1 and f(n)=⎩⎨⎧di+1d1n(n=di,1≤i≤l−1),(n=dl),(otherwise).
Conversely, if there exists such a sequence d1<d2<⋯<dl, f satisfies the given condition. Therefore the problem is equivalent to count sequences of integers d1<d2<⋯<dl=1000 such that di+1 is a multiple of di for any 1≤i≤l−1.
For a positive integer n, let cn be the number of sequences of positive integers d1<d2<⋯<dl=n such that di+1 is a multiple of di for any 1≤i≤l−1. It is clear that c1=1. Let n≥2. If l=1, such sequence is unique. If l≥2, dl−1 must be a positive divisor of n less than n, and for any positive divisor m<n of n there exists cm sequences satisfying the condition with dl−1=m. Hence it follows that cn=1+m<n,m∣n∑cm.