Maths Olympiad Prep

Library / Irish Mathematical Olympiad /227 of 236

Irish Mathematical Olympiad

Number theory Difficulty 7.4 National Olympiad, round 2 Prove it Ireland

a) For each integer aa not divisible by 77, let N(a)N(a) denote the least among all positive integers nn such that 4949 divides an−1a^n - 1. For each positive integer NN, let AN:={a∈Z:0<a<49 and N(a)=N}A_N := \{a \in \mathbb{Z} : 0 < a < 49 \text{ and } N(a) = N\}. Show that
∣A1∣=∣A2∣=1,∣A3∣=∣A6∣=2,∣A7∣=∣A14∣=6,∣A21∣=∣A42∣=12 \begin{align*} |A_1| &= |A_2| = 1, & |A_3| &= |A_6| = 2, \\ |A_7| &= |A_{14}| = 6, & |A_{21}| &= |A_{42}| = 12 \end{align*}
and AN=∅A_N = \emptyset for all other values of NN.

b) Find the least positive integer nn such that 20092009 divides an−1a^n - 1 for all integers aa relatively prime to 20092009.

Solution

a) Unless otherwise specified, everywhere in part a), ≡\equiv will denote congruence modulo 4949. Consider the six cases a=7k±1a = 7k \pm 1, 7k±27k \pm 2 and 7k±37k \pm 3.

1. If a=7k+1a = 7k + 1, with k∈{0,1,...,6}k \in \{0, 1, ..., 6\}, then an=7kn+1a^n = 7kn + 1, so an≡1(mod7)a^n \equiv 1 \pmod{7}
k=0k = 0 or nn is a multiple of 77. Thus 1∈A11 \in A_1 and 7k+1∈A77k + 1 \in A_7 for k∈{1,...,6}k \in \{1, ..., 6\}.

2. If a=7k−1a = 7k - 1, with k∈{1,...,7}k \in \{1, ..., 7\}, then an=(−1)n−1(7kn−1)a^n = (-1)^{n-1}(7kn - 1). If nn is odd, then an≡1(mod7kn)≡2a^n \equiv 1 \pmod{7kn} \equiv 2 which cannot hold as 7∤27 \nmid 2. If nn is even, then an≡1(mod7kn)≡0a^n \equiv 1 \pmod{7kn} \equiv 0 which holds when k=7k = 7 or nn is a multiple of 1414.
Thus a=48∈A2a = 48 \in A_2 and 7k−1∈A147k - 1 \in A_{14} for k∈{1,...,6}k \in \{1, ..., 6\}.

3. If a=7k+2a = 7k + 2, with k∈{0,1,...,6}k \in \{0, 1, ..., 6\}, then an=2n−17kn+2na^n = 2^{n-1}7kn + 2^n, so
an≡1(mod2n−17kn+49l)≡1−2n for some integer l. a^n \equiv 1 \pmod{2^{n-1}7kn + 49l} \equiv 1 - 2^n \text{ for some integer } l.
This implies in a first instance that 7∣(1−2n)7|(1 - 2^n), i.e. n=3mn = 3m for some integer mm. Then
1−2n7=1−23m7=(1−23)(1+23+⋯+(23)m−1)7=−m(mod7) \frac{1 - 2^n}{7} = \frac{1 - 2^{3m}}{7} = \frac{(1 - 2^3)(1 + 2^3 + \dots + (2^3)^{m-1})}{7} = -m \pmod{7}
and 2n−1≡23m−1≡4(mod7). \text{and } 2^{n-1} \equiv 2^{3m-1} \equiv 4 \pmod{7}.
Therefore, if n=3mn = 3m and k=4k = 4, there exists an integer ll such that
2n−1kn+7l=1−2n7. 2^{n-1}kn + 7l = \frac{1 - 2^n}{7}.
This implies a=30∈A3a = 30 \in A_3. Moreover, when 7∤n7 \nmid n, then any two solutions kk and k′k' of the equation above differ by a multiple of 77. On the other hand, if 7∣n7|n, any value of kk is a solution, so a=7k+2∈A21a = 7k + 2 \in A_{21} for k∈{0,...,6}∖{4}k \in \{0, ..., 6\} \setminus \{4\}.

4. If a=7k−2a = 7k - 2, with k∈{1,…,7}k \in \{1, \dots, 7\}, then an=(−2)n−1(7kn−2)a^n = (-2)^{n-1}(7kn - 2). If nn is odd, then an=1  ⟺  2n−17kn=2n+1a^n = 1 \iff 2^{n-1}7kn = 2^n + 1 which implies that 7∣(1+2n)7|(1+2^n). A short check of the possible values of 1+2n1+2^n modulo 77 shows that this is not possible. If nn is even, then an=1  ⟺  −2n−17kn+49l=1−2na^n = 1 \iff -2^{n-1}7kn + 49l = 1-2^n for some integer ll. Similarly to the previous case, this implies a=7⋅3−2=19∈A6a = 7 \cdot 3 - 2 = 19 \in A_6 and a=7k−2∈A42a = 7k - 2 \in A_{42} for k∈{0,…,6}∖{3}k \in \{0, \dots, 6\} \setminus \{3\}.

5. If a=7k+3a = 7k + 3, with k∈{0,1,…,6}k \in \{0, 1, \dots, 6\}, then an=3n−17kn+3na^n = 3^{n-1}7kn + 3^n, so an=1  ⟺  3n−17kn+49l=1−3na^n = 1 \iff 3^{n-1}7kn + 49l = 1 - 3^n for some integer ll. This implies that 7∣(1−3n)7|(1-3^n), i.e. n=6mn = 6m for some integer mm. Then
1−3n7=1−36m7=(1−36)(1+36+⋯+(36)m−1)7≡mmod  7and 3n−1≡5mod  7 \frac{1-3^n}{7} = \frac{1-3^{6m}}{7} = \frac{(1-3^6)(1+3^6+\dots+(3^6)^{m-1})}{7} \equiv m \quad \mod 7 \\ \text{and } 3^{n-1} \equiv 5 \quad \mod 7
Therefore, if n=6mn = 6m and k=4k = 4, there exists an integer ll such that the equation
3n−1kn+7l=1−3n7 3^{n-1}kn + 7l = \frac{1-3^n}{7}
holds, so a=31∈A6a = 31 \in A_6. As in the previous cases, a=7k+3∈A42a = 7k + 3 \in A_{42} for k∈{0,…,6}∖{4}k \in \{0, \dots, 6\} \setminus \{4\}.

6. If a=7k−3a = 7k - 3, with k∈{1,…,7}k \in \{1, \dots, 7\}, then an=(−3)n−1(7kn−2)a^n = (-3)^{n-1}(7kn - 2). If nn is odd, then an=1  ⟺  3n−17kn=3n+1a^n = 1 \iff 3^{n-1}7kn = 3^n + 1 which implies that 7∣(1+3n)7|(1+3^n). A short check of the possible values of 1+3n1+3^n modulo 77 shows that this is equivalent to n=6m+3n = 6m + 3 and then an=1  ⟺  3n−1kn=3n+17a^n = 1 \iff 3^{n-1}kn = \frac{3^{n+1}}{7}, where the right hand side becomes
1+33(2m+1)7=(1+33)(1−33+⋯+(33)2m)7≡4(2m+1)mod  7, \frac{1+3^{3(2m+1)}}{7} = \frac{(1+3^3)(1-3^3+\dots+(3^3)^{2m})}{7} \equiv 4(2m+1) \quad \mod 7,
an=1a^n = 1 becomes 36m+3k(2m+1)=4(2m+1)(mod7)3^{6m+3}k(2m+1) = 4(2m+1) \pmod 7, equivalently 6k(2m+1)=4(2m+1)(mod7)6k(2m+1) = 4(2m+1) \pmod 7, which holds for all mm when k=3k=3, and for all kk when (2m+1)≡0(mod7)(2m+1) \equiv 0 \pmod 7. Thus a=7⋅3−3=18∈A3a = 7 \cdot 3 - 3 = 18 \in A_3 while a=7k−3∈A21a = 7k - 3 \in A_{21} for k∈{1,…,7}∖{3}k \in \{1, \dots, 7\} \setminus \{3\}. If nn is even, then an=1  ⟺  −3n−17kn+49l=1−3na^n = 1 \iff -3^{n-1}7kn + 49l = 1 - 3^n for some integer ll. Similarly to the previous case, this implies a6=1a^6 = 1 for a=7⋅3−2=18a = 7 \cdot 3 - 2 = 18 and a42=1a^{42} = 1 for a=7k−2a = 7k - 2 and k∈{0,…,6}∖{3}k \in \{0, \dots, 6\} \setminus \{3\}, which was already known from the case of nn odd.

b) 2009=49⋅412009 = 49 \cdot 41. From a) it follows that 4949 divides a42−1a^{42} - 1 for all integers aa relatively prime to 4949. From Fermat's theorem, 4141 divides a40−1a^{40} - 1 for all integers aa relatively prime to 4141. The least common multiple of 4040 and 4242 is 840840 and thus 20092009 divides a840−1a^{840} - 1 for all integers aa relatively prime to 20092009. It now suffices to find an integer aa such that 2009∣(an−1)⇔840∣n2009|(a^n - 1) \Leftrightarrow 840|n. It is natural to try a∈A42={3,5,10,12,17,24,26,33,38,40,45}a \in A_{42} = \{3, 5, 10, 12, 17, 24, 26, 33, 38, 40, 45\}. Modulo 4141, we have 38≡13^8 \equiv 1, 520≡15^{20} \equiv 1 and 105≡110^5 \equiv 1, but n=40n = 40 is the least power such that 12n≡112^n \equiv 1, so n=840n = 840 is indeed the least power such that 2009∣(12n−1)2009|(12^n - 1).

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

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