Maths Olympiad Prep

Library / /75 of 84

, 2013

Number theory Difficulty 5.9 AIME, harder Prove it United States

Problem:

Let mm be an odd positive integer greater than 11. Let SmS_{m} be the set of all non-negative integers less than mm which are of the form x+yx+y, where xy1x y-1 is divisible by mm. Let f(m)f(m) be the number of elements of SmS_{m}.

a. Prove that f(mn)=f(m)f(n)f(m n)=f(m) f(n) if m,nm, n are relatively prime odd integers greater than 11.

b. Find a closed form for f(pk)f\left(p^{k}\right), where k>0k>0 is an integer and pp is an odd prime.

Solution

Solution:

For a positive integer nn, let Z/nZ\mathbb{Z} / n \mathbb{Z} denote the set of residues modulo nn and (Z/nZ)(\mathbb{Z} / n \mathbb{Z})^{*} denote the set of residues modulo nn that are relatively prime to nn. Then, rephrased, SmS_{m} is the set of residues modulo mm of the form x+x1x+x^{-1}, where x(Z/mZ)x \in (\mathbb{Z} / m \mathbb{Z})^{*}.

For part (a), suppose a=x+x1Sma = x + x^{-1} \in S_{m} and b=y+y1Snb = y + y^{-1} \in S_{n}. By the Chinese Remainder Theorem, there exists a residue z(Z/mnZ)z \in (\mathbb{Z} / m n \mathbb{Z})^{*} such that m(xz)m \mid (x-z) and n(yz)n \mid (y-z), and thus z+z1x+x1(modm)z + z^{-1} \equiv x + x^{-1} \pmod{m} and z+z1y+y1(modn)z + z^{-1} \equiv y + y^{-1} \pmod{n}. Therefore, all f(m)f(n)f(m) f(n) residues modulo mnm n which result from applying the Chinese Remainder Theorem to an element each of SmS_{m} and SnS_{n} are in SmnS_{m n}. Conversely, given z+z1(Z/mnZ)z + z^{-1} \in (\mathbb{Z} / m n \mathbb{Z})^{*}, taking z+z1z + z^{-1} modulo mm and nn gives elements of SmS_{m} and SnS_{n}, so indeed f(mn)=f(m)f(n)f(m n) = f(m) f(n).

We now proceed to part (b). For each x(Z/pkZ)x \in (\mathbb{Z} / p^{k} \mathbb{Z})^{*}, denote q(x)q(x) to be the largest non-negative integer iki \leq k such that pip^{i} divides x21x^{2}-1 (this is clearly well-defined). For a given xx, let g(x)g(x) be the number of y(Z/pkZ)y \in (\mathbb{Z} / p^{k} \mathbb{Z})^{*} such that x+x1y+y1(modpk)x + x^{-1} \equiv y + y^{-1} \pmod{p^{k}}. Note that this condition is equivalent to (xy)(xy1)0(modpk)(x-y)(x y-1) \equiv 0 \pmod{p^{k}}.

First, consider the case in which q(x)k/2q(x) \geq k / 2, in which case we have pk/2(x1)(x+1)p^{\lceil k / 2 \rceil} \mid (x-1)(x+1), and because pp is odd, x±1(modpk/2)x \equiv \pm 1 \pmod{p^{\lceil k / 2 \rceil}}. Thus, either (x1)20(modpk)(x-1)^{2} \equiv 0 \pmod{p^{k}} or (x+1)20(modpk)(x+1)^{2} \equiv 0 \pmod{p^{k}}, and it follows that x+x1±2(modpk)x + x^{-1} \equiv \pm 2 \pmod{p^{k}} (clearly 22 and 2-2 are distinct). Conversely, x+x1±2x + x^{-1} \equiv \pm 2 implies (x±1)0(modpk/2)(x \pm 1) \equiv 0 \pmod{p^{\lceil k / 2 \rceil}}, which in turn implies q(x)k/2q(x) \geq k / 2. It is now clear that there are exactly two elements of SmS_{m} corresponding to residues of the form x+x1x + x^{-1} with q(x)k/2q(x) \geq k / 2, and all other elements of SmS_{m} come from xx with q(x)<k/2q(x) < k / 2.

Fix xx with q(x)<k/2q(x) < k / 2; we will compute g(x)g(x). Suppose (xy)(xy1)0(modpk)(x-y)(x y-1) \equiv 0 \pmod{p^{k}}, and say xy,xy1x-y, x y-1 have j,jj, j' factors of pp, respectively. If jjj \leq j', note that x21xy10(modpj)x^{2}-1 \equiv x y-1 \equiv 0 \pmod{p^{j}}, so jq(x)j \leq q(x). Similarly, if jjj' \leq j, xy(modpj)x \equiv y \pmod{p^{j'}}, so x21xy10(modpj)x^{2}-1 \equiv x y-1 \equiv 0 \pmod{p^{j'}}, and so jq(x)j' \leq q(x). It follows that min(j,j)q(x)\min(j, j') \leq q(x), and thus max(j,j)kq(x)\max(j, j') \geq k - q(x).

Suppose pkq(x)(xy)p^{k-q(x)} \mid (x-y). Then, xy1x210(modpq(x))x y-1 \equiv x^{2}-1 \equiv 0 \pmod{p^{q(x)}} because q(x)<k/2q(x) < k / 2, so any yy with pkq(x)(xy)p^{k-q(x)} \mid (x-y) satisfies (xy)(xy1)0(modpk)(x-y)(x y-1) \equiv 0 \pmod{p^{k}}. Now, suppose pkq(x)(xy1)p^{k-q(x)} \mid (x y-1), that is, yx1(modpkq(x))y \equiv x^{-1} \pmod{p^{k-q(x)}}. Then, xy1(modpq(x))x y \equiv 1 \pmod{p^{q(x)}}, and since x21(modpq(x))x^{2} \equiv 1 \pmod{p^{q(x)}}, we have xy(modpq(x))x \equiv y \pmod{p^{q(x)}}, so again we have (xy)(xy1)0(modpk)(x-y)(x y-1) \equiv 0 \pmod{p^{k}}. It follows that the set of yy satisfying (xy)(xy1)0(modpk)(x-y)(x y-1) \equiv 0 \pmod{p^{k}} is exactly the set of yy with yx(modpkq(x))y \equiv x \pmod{p^{k-q(x)}} or yx1(modpkq(x))y \equiv x^{-1} \pmod{p^{k-q(x)}}. x,x1x, x^{-1} are distinct residues modulo pkq(x)p^{k-q(x)}, because x21x^{2}-1 has fewer than k/2k / 2 factors of pp, so it follows that g(x)=2pq(x)g(x) = 2 p^{q(x)}. In particular, note that these values are distinct for different values of q(x)<k/2q(x) < k / 2, so x+x1y+y1x + x^{-1} \equiv y + y^{-1} implies q(x)=q(y)q(x) = q(y) or q(x),q(y)k/2q(x), q(y) \geq k / 2.

For each integer ii with 0i<k/20 \leq i < k / 2, we need to compute the number of x(Z/pkZ)x \in (\mathbb{Z} / p^{k} \mathbb{Z}) with q(x)=iq(x) = i. Clearly, this is the number of xx with pix21p^{i} \mid x^{2}-1 minus the number of xx with pi+1x21p^{i+1} \mid x^{2}-1. When i=0i = 0, the number of xx with pix21p^{i} \mid x^{2}-1 is clearly pk1(p1)p^{k-1}(p-1), and when i>0i > 0, this number is 2pki2 p^{k-i}, as we have x±1(modpi)x \equiv \pm 1 \pmod{p^{i}}.

We can now count the number of elements of SpkS_{p^{k}} using casework on the value of q(x)q(x) where we take xx to be such that x+x1x + x^{-1} is a particular element of SmS_{m}. Applying the results from the previous two paragraphs, our answer is
2+pk1(p3)2+i=1k/212pki2pki12pi 2 + \frac{p^{k-1}(p-3)}{2} + \sum_{i=1}^{\lceil k / 2 \rceil - 1} \frac{2 p^{k-i} - 2 p^{k-i-1}}{2 p^{i}}
where the summand 22 comes from ±2Spk\pm 2 \in S_{p^{k}}, corresponding to all xx with q(x)>k/2q(x) > k / 2, the next summand comes from those xx with q(x)=0q(x) = 0, and each additional summand comes from those xx with q(x)=iq(x) = i in the relevant range. We may evaluate the last sum as a geometric series, to obtain the final closed form answer of
2+pk1(p3)2+pk1p1+(1)k2p+1 2 + \frac{p^{k-1}(p-3)}{2} + \frac{p^{k-1} - p^{\frac{1+(-1)^{k}}{2}}}{p+1}

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.