Olympiad Maths Prep

Track / Stage 7 / 238 of 300 #1638 of 2000

Problem 1638

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.5 Find the answer

Let p5p\geq 5 be a prime number, and set M={1,2,,p1}.M=\{1,2,\cdots,p-1\}. Define T={(n,xn):pnxn1 and n,xnM}.T=\{(n,x_n):p|nx_n-1\ \textup{and}\ n,x_n\in M\}. If (n,xn)Tn[nxnp]k(modp),\sum_{(n,x_n)\in T}n\left[\dfrac{nx_n}{p}\right]\equiv k \pmod {p}, with 0kp1,0\leq k\leq p-1, where [α]\left[\alpha\right] denotes the largest integer that does not exceed α,\alpha, determine the value of k.k.

Official solution

1. **Define the set T T and the problem constraints:**
Given p5 p \geq 5 is a prime number, and M={1,2,,p1} M = \{1, 2, \ldots, p-1\} . Define the set
T={(n,xn):pnxn1 and n,xnM}. T = \{(n, x_n) : p \mid nx_n - 1 \text{ and } n, x_n \in M\}.
We need to determine the value of k k such that
(n,xn)Tnnxnpk(modp), \sum_{(n, x_n) \in T} n \left\lfloor \frac{nx_n}{p} \right\rfloor \equiv k \pmod{p},
where 0kp1 0 \leq k \leq p-1 and α \left\lfloor \alpha \right\rfloor denotes the largest integer not exceeding α \alpha .

2. **Identify the relationship between n n and xn x_n :**
Since pnxn1 p \mid nx_n - 1 , we have nxn1(modp) nx_n \equiv 1 \pmod{p} . This implies xnn1(modp) x_n \equiv n^{-1} \pmod{p} , where n1 n^{-1} is the modular inverse of n n modulo p p .

3. **Symmetry in the set T T :**
Note that for each nM n \in M , there exists a unique xnM x_n \in M such that nxn1(modp) nx_n \equiv 1 \pmod{p} . Also, for nM n \in M , xpn=pxn x_{p-n} = p - x_n .

4. Sum transformation:
Consider the sum
n=1p1nnxnp. \sum_{n=1}^{p-1} n \left\lfloor \frac{nx_n}{p} \right\rfloor.
Since nxn1(modp) nx_n \equiv 1 \pmod{p} , we have nxn1p \frac{nx_n - 1}{p} is an integer. Thus,
nxnp=nxn1p. \left\lfloor \frac{nx_n}{p} \right\rfloor = \frac{nx_n - 1}{p}.

5. Simplify the sum:
n=1p1nnxnp=n=1p1nnxn1p. \sum_{n=1}^{p-1} n \left\lfloor \frac{nx_n}{p} \right\rfloor = \sum_{n=1}^{p-1} n \cdot \frac{nx_n - 1}{p}.
This can be rewritten as:
n=1p1n2xnnp. \sum_{n=1}^{p-1} \frac{n^2 x_n - n}{p}.

6. Pairing terms:
Pair the terms n n and pn p-n :
n=1p1n2xnn+(pn)2(pxn)(pn)p. \sum_{n=1}^{p-1} \frac{n^2 x_n - n + (p-n)^2 (p-x_n) - (p-n)}{p}.
Simplify the expression inside the sum:
n2xnn+(pn)2(pxn)(pn)p=n2xnn+(p22pn+n2)(pxn)(pn)p. \frac{n^2 x_n - n + (p-n)^2 (p-x_n) - (p-n)}{p} = \frac{n^2 x_n - n + (p^2 - 2pn + n^2)(p - x_n) - (p-n)}{p}.

7. Further simplification:
=n2xnn+p3p2xn2p2n+2pnxn+n2ppp+np. = \frac{n^2 x_n - n + p^3 - p^2 x_n - 2p^2 n + 2pn x_n + n^2 p - p - p + n}{p}.
Combine like terms:
=p3p2xn2p2n+2pnxn+n2ppp. = \frac{p^3 - p^2 x_n - 2p^2 n + 2pn x_n + n^2 p - p}{p}.

8. Final simplification:
=p2pxn2pn+2nxn+n21. = p^2 - px_n - 2pn + 2nx_n + n^2 - 1.
Summing over n n from 1 to p1 p-1 :
n=1p1(p2pxn2pn+2nxn+n21). \sum_{n=1}^{p-1} (p^2 - px_n - 2pn + 2nx_n + n^2 - 1).

9. **Modulo p p simplification:**
Since p20(modp) p^2 \equiv 0 \pmod{p} and pxn0(modp) px_n \equiv 0 \pmod{p} :
n=1p1(2+n21)=n=1p1(n2+1). \sum_{n=1}^{p-1} (2 + n^2 - 1) = \sum_{n=1}^{p-1} (n^2 + 1).

10. Sum of squares and constants:
n=1p1n2=(p1)p(2p1)6, \sum_{n=1}^{p-1} n^2 = \frac{(p-1)p(2p-1)}{6},
and
n=1p11=p1. \sum_{n=1}^{p-1} 1 = p-1.

11. Combine results:
n=1p1(n2+1)=(p1)p(2p1)6+(p1). \sum_{n=1}^{p-1} (n^2 + 1) = \frac{(p-1)p(2p-1)}{6} + (p-1).

12. **Final modulo p p calculation:**
(p1)p(2p1)6+(p1)(p1)(2p1)6+(p1)(modp). \frac{(p-1)p(2p-1)}{6} + (p-1) \equiv \frac{(p-1)(2p-1)}{6} + (p-1) \pmod{p}.
Simplify:
(p1)(2p1+6)6=(p1)(2p+5)6. \frac{(p-1)(2p-1 + 6)}{6} = \frac{(p-1)(2p+5)}{6}.
Since 2p+52p+5(modp) 2p+5 \equiv 2p+5 \pmod{p} :
(p1)(2p+5)6(p1)(2p+5)6(modp). \frac{(p-1)(2p+5)}{6} \equiv \frac{(p-1)(2p+5)}{6} \pmod{p}.

13. Final result:
k=p12. k = \frac{p-1}{2}.

The final answer is p12\boxed{\frac{p-1}{2}}.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.