Maths Olympiad Prep

Track / Stage 6 / 275 of 400 #1275 of 1964

Problem 1275

National olympiad, first round
Number theory Difficulty 6.5 Find the answer

Let pp be an odd prime number. For positive integer kk satisfying 1kp11\le k\le p-1, the number of divisors of kp+1kp+1 between kk and pp exclusive is aka_k. Find the value of a1+a2++ap1a_1+a_2+\ldots + a_{p-1}.

A number or a short expression. Spacing, $ signs and \frac vs / are all fine.

Official solution

1. Understanding the Problem:
We need to find the sum a1+a2++ap1 a_1 + a_2 + \ldots + a_{p-1} , where ak a_k is the number of divisors of kp+1 kp + 1 that lie strictly between k k and p p .

2. Analyzing the Divisors:
For each k k in the range 1kp1 1 \le k \le p-1 , consider the number kp+1 kp + 1 . We need to count the divisors of kp+1 kp + 1 that are strictly between k k and p p .

3. Claim:
For a fixed m m (where 1<m<p 1 < m < p ), m m contributes exactly once to one of a1,a2,,am1 a_1, a_2, \ldots, a_{m-1} .

4. Proof of the Claim:
Consider the numbers p+1,2p+1,,(m1)p+1 p+1, 2p+1, \ldots, (m-1)p+1 . We need to show that m m divides exactly one of these numbers.

- Since gcd(m,p)=1 \gcd(m, p) = 1 (because p p is a prime and m<p m < p ), m m does not divide p p .
- Therefore, m m must divide kp+1 kp + 1 for some k k in the range 1km1 1 \le k \le m-1 .

To see why, consider the congruences:
p+11(modm),2p+12(modm),,(m1)p+1m1(modm) p+1 \equiv 1 \pmod{m}, \quad 2p+1 \equiv 2 \pmod{m}, \quad \ldots, \quad (m-1)p+1 \equiv m-1 \pmod{m}
Since gcd(m,p)=1 \gcd(m, p) = 1 , the numbers p,2p,,(m1)p p, 2p, \ldots, (m-1)p form a complete residue system modulo m m . Thus, kp+1 kp + 1 will be congruent to 1,2,,m1 1, 2, \ldots, m-1 modulo m m , respectively.

Therefore, m m will divide exactly one of these numbers kp+1 kp + 1 for k k in the range 1km1 1 \le k \le m-1 .

5. Summing Up Contributions:
Each m m (where 1<m<p 1 < m < p ) contributes exactly once to one of a1,a2,,am1 a_1, a_2, \ldots, a_{m-1} . Since there are p2 p-2 such m m (from 2 2 to p1 p-1 ), the total sum a1+a2++ap1 a_1 + a_2 + \ldots + a_{p-1} is p2 p-2 .

The final answer is p2\boxed{p-2}.

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