Maths Olympiad Prep

Track / Stage 10 / 9 of 32 #2581 of 2604

Problem 2581

Hardest shortlist tier
Number theory Difficulty 9.2 Prove it United States — Team Selection Test · United States · 2010

Define the sequence a1,a2,a3,…a_1, a_2, a_3, \dots by a1=1a_1 = 1 and
an=a⌊n/2⌋+a⌊n/3⌋+⋯+a⌊n/n⌋+1 a_n = a_{\lfloor n/2 \rfloor} + a_{\lfloor n/3 \rfloor} + \dots + a_{\lfloor n/n \rfloor} + 1
for n>1n > 1. Prove that there are infinitely many nn such that
an≡n(mod22010). a_n \equiv n \pmod{2^{2010}}.
(This problem was suggested by Gabriel Carroll.)

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.

Next problem →

Official solution

Our solution will be based upon the following key observation, for which we provide two different proofs.

Lemma 1. Let pp be a prime. If psp^s divides nn, then 2s−12^{s-1} divides an−an−1a_n - a_{n-1}, where a0=0a_0 = 0.

First proof of Lemma 1. We argue by induction on ss and then nn. First, the base case s=1s=1 is vacuous. Now assume the claim holds for some s−1s-1, and suppose that there existed some smallest nn such that psp^s divides nn but 2s−12^{s-1} does not divide an−an−1a_n - a_{n-1}. Consider the auxiliary sequence defined by bn=an−an−1b_n = a_n - a_{n-1}. By the given, the sequence bnb_n satisfies
bn=∑i=2n(a⌊ni⌋−a⌊n−1i⌋)=∑i∣ni>1bn/i=∑i∣ni<nbi.(1) b_n = \sum_{i=2}^{n} \left( a_{\lfloor \frac{n}{i} \rfloor} - a_{\lfloor \frac{n-1}{i} \rfloor} \right) = \sum_{\substack{i|n \\ i>1}} b_{n/i} = \sum_{\substack{i|n \\ i<n}} b_i. \qquad (1)
Applying (1), we see that
bn/p=∑i∣n/pi<n/pbi, b_{n/p} = \sum_{\substack{i|n/p \\ i<n/p}} b_i,
so we may write
bn=bn/p+∑i∣n/pi<n/pbi+∑i∣ni∤n/pi<nbi=2bn/p+∑i∣ni∤n/pi<nbi.(2) b_n = b_{n/p} + \sum_{\substack{i|n/p \\ i<n/p}} b_i + \sum_{\substack{i|n \\ i \nmid n/p \\ i<n}} b_i = 2b_{n/p} + \sum_{\substack{i|n \\ i \nmid n/p \\ i<n}} b_i. \qquad (2)
Notice that ps−1∣n/pp^{s-1} \mid n/p, so by the inductive hypothesis, we see that 2s−1∣2bn/p2^{s-1} \mid 2b_{n/p}. Further, for any i<ni < n dividing nn but not n/pn/p, we have that ps∣ip^s \mid i, hence 2s−1∣bi2^{s-1} \mid b_i because i<ni < n and nn was chosen to be the smallest multiple of psp^s for which 2s−1∤bn2^{s-1} \nmid b_n. Therefore, (2) shows that 2s−1∣bn2^{s-1} \mid b_n, a contradiction. This completes the induction, showing that if ps∣np^s \mid n, then 2s−1∣an−an−12^{s-1} \mid a_n - a_{n-1}. □\square

Second proof of Lemma 1. Let us interpret the sequence ana_n combinatorially as follows. Call a finite increasing sequence of integers k1<k2<⋯<krk_1 < k_2 < \dots < k_r good if k1=1k_1 = 1 and kj∣kj+1k_j \mid k_{j+1} for each 1≤j<r1 \le j < r. Let cnc_n be the number of good sequences whose last term is at most nn. Then, we claim that an=cna_n = c_n.

Indeed, for any 1<k≤n1 < k \le n, good sequences with second term kk and last term at most nn are in bijection with good sequences with last term at most ⌊n/k⌋\lfloor n/k \rfloor; here, the bijection is provided by dividing each term after the first by kk. Counting also the sequence consisting of the single term 1, we obtain the recurrence
cn=c⌊n/2⌋+c⌊n/3⌋+⋯+c⌊n/n⌋+1. c_n = c_{\lfloor n/2 \rfloor} + c_{\lfloor n/3 \rfloor} + \dots + c_{\lfloor n/n \rfloor} + 1.
Observe further that c1=a1=1c_1 = a_1 = 1, meaning that the sequence {cn}\{c_n\} satisfies the same recurrence and initial conditions as {an}\{a_n\}. Therefore, we obtain an=cna_n = c_n.

Now, note that an−an−1a_n - a_{n-1} is the number of good sequences whose last term is exactly nn. It suffices therefore to show that if psp^s is the highest power of pp dividing nn, then the number of good sequences ending in nn is divisible by 2s−12^{s-1}. Let the pp-skeleton of a good sequence k1,…,krk_1, \dots, k_r be the sub-sequence consisting of all the terms kjk_j such that kj/kj−1k_j/k_{j-1} is not a power of pp (including the initial 1). It suffices for us to show that the number of good sequences ending in nn with a given pp-skeleton is divisible by 2s−12^{s-1}.

Take any pp-skeleton, which we may write in the form
pt1k1′,pt2k2′,…,ptmkm′ p^{t_1} k'_1, p^{t_2} k'_2, \dots, p^{t_m} k'_m
for some t1,…,tmt_1, \dots, t_m and k1′,…,km′k'_1, \dots, k'_m satisfying t1=0t_1 = 0, k1′=1k'_1 = 1, p∤kj′p \nmid k'_j, k1′∣k2′∣⋯∣km′k'_1 \mid k'_2 \mid \dots \mid k'_m, and t1≤t2≤⋯≤tmt_1 \le t_2 \le \dots \le t_m. Now, to form a good sequence ending in nn that has this pp-skeleton, between any two consecutive terms ptjkj′,ptj+1kj+1′p^{t_j} k'_j, p^{t_{j+1}} k'_{j+1} of the pp-skeleton we can insert any subset of the set
{ptj+1kj′,ptj+2kj′,…,ptj+1kj′}. \{p^{t_{j+1}} k'_j, p^{t_{j+2}} k'_j, \dots, p^{t_{j+1}} k'_j\}.
Also, if the last term ptr′kr′′p^{t_{r'}} k'_{r'} is not equal to nn, we can insert any subset containing nn of
{ptr′+1kr′′,ptr′+2kr′′,…,ps−1kr′′} \{p^{t_{r'}+1} k'_{r'}, p^{t_{r'}+2} k'_{r'}, \dots, p^{s-1} k'_{r'}\}
after it. Hence, for each t=1,…,s−1t = 1, \dots, s-1, there is exactly one number of the form ptkp^t k with p∤kp \nmid k that we can choose to include or not in our good sequence. For t=st = s, we can choose to include the number if nn is not in the skeleton; otherwise including it is obligatory. So the number of good sequences ending in nn that have the given pp-skeleton is either 2s−12^{s-1} or 2s2^s, depending whether or not nn is part of the skeleton; in any case, it is divisible by 2s−12^{s-1}. It follows that the total number of good sequences ending in nn is divisible by 2s−12^{s-1}, establishing the lemma. □\square

We now consider the problem proper. For any positive integer mm, choose distinct primes p1,p2,…,pmp_1, p_2, \dots, p_m. By the Chinese Remainder Theorem, there exists some kk such that k+ik + i is divisible by pisp_i^s for 1≤i≤m1 \le i \le m. By Lemma 1, this implies that ak+i−ak+i−1a_{k+i} - a_{k+i-1} is divisible by 2s−12^{s-1} for 1≤i≤m1 \le i \le m, meaning that ak,ak+1,…,ak+ma_k, a_{k+1}, \dots, a_{k+m} are all congruent modulo 2s−12^{s-1}. For any NN, if we take m>N+2s−1−1m > N + 2^{s-1} - 1, there exist positive integers kk and n∈{k+N,…,k+N+2s−1−1}n \in \{k+N, \dots, k+N+2^{s-1}-1\} such that an≡n(mod2s−1)a_n \equiv n \pmod{2^{s-1}}. In particular, this nn satisfies n>Nn > N. Therefore, for any positive integer ss, the set of nn such that an≡n(mod2s−1)a_n \equiv n \pmod{2^{s-1}} is unbounded, hence infinite. Taking s=2011s = 2011 gives the desired result.

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