Maths Olympiad Prep

Library / /357 of 520

Number theory Difficulty 6.8 National olympiad Prove it

Let pp be a prime number for which p12\frac{p-1}{2} is also prime, and let aa, bb, cc be integers not divisible by pp. Prove that there are at most 1+2p1+\sqrt{2 p} positive integers nn such that n<pn<p and pp divides an+bn+cna^{n}+b^{n}+c^{n}.

Solutions — 2

Solution 1

First suppose b±a(modp) b \equiv \pm a \pmod{p} and c±b(modp) c \equiv \pm b \pmod{p} . Then, for any n n , we have an+bn+cn±an a^n + b^n + c^n \equiv \pm a^n or ±3an(modp) \pm 3a^n \pmod{p} . We are given that p3 p \neq 3 (since 312 \frac{3-1}{2} is not prime) and pa p \nmid a , so it follows that an+bn+cn≢0(modp) a^n + b^n + c^n \not\equiv 0 \pmod{p} . The claim is trivial in this case. Otherwise, we may assume without loss of generality that b≢±a(modp)ba1≢±1(modp) b \not\equiv \pm a \pmod{p} \Longrightarrow b a^{-1} \not\equiv \pm 1 \pmod{p} .

Now let q=p12 q = \frac{p-1}{2} . By Fermat's little theorem, we know that the order of ba1(modp) b a^{-1} \pmod{p} divides p1=2q p-1 = 2q . However, since ba1≢±1(modp) b a^{-1} \not\equiv \pm 1 \pmod{p} , the order of ba1 b a^{-1} does not divide 2. Thus, the order must be either q q or 2q 2q .

Next, let S S denote the set of positive integers n<p n < p such that an+bn+cn0(modp) a^n + b^n + c^n \equiv 0 \pmod{p} , and let st s_t denote the number of ordered pairs (i,j)S (i, j) \subset S such that ijt(modp1) i - j \equiv t \pmod{p-1} .

Lemma: If t t is a positive integer less than 2q 2q and not equal to q q , then st2 s_t \leq 2 .

Proof: Consider i,jS i, j \in S with jit(modp1) j - i \equiv t \pmod{p-1} . Then we have

ai+bi+ci0(modp)aicji+bicji+cj0(modp)aicji+bicjiajbj0(modp)ai(ctat)bi(btct)(modp). \begin{aligned} & a^i + b^i + c^i \equiv 0 \pmod{p} \\ \Longrightarrow & a^i c^{j-i} + b^i c^{j-i} + c^j \equiv 0 \pmod{p} \\ \Longrightarrow & a^i c^{j-i} + b^i c^{j-i} - a^j - b^j \equiv 0 \pmod{p} \\ \Longrightarrow & a^i \cdot (c^t - a^t) \equiv b^i \cdot (b^t - c^t) \pmod{p}. \end{aligned}

If ctat(modp) c^t \equiv a^t \pmod{p} , then this implies ctbt(modp) c^t \equiv b^t \pmod{p} as well, so (ab1)t1(modp) (a b^{-1})^t \equiv 1 \pmod{p} . However, we know the order of ab1 a b^{-1} is q q or 2q 2q , and qt q \neq t , so this is impossible. Thus, we can write

(ab1)i(btct)(ctat)1(modp). (a b^{-1})^i \equiv (b^t - c^t) \cdot (c^t - a^t)^{-1} \pmod{p}.

For a fixed t t , the right-hand side of this equation is fixed, so (ab1)i (a b^{-1})^i is also fixed. Since the order of ab1 a b^{-1} is either q q or 2q 2q , it follows that there are at most 2 solutions for i i , and the lemma is proven.

Now, for each element i i in S S , there are at least S2 |S| - 2 other elements that differ from i i by a quantity other than q(modp1) q \pmod{p-1} . Therefore, the lemma implies that

S(S2)tqst2(p2)(S1)22p3S<2p+1. \begin{aligned} |S| \cdot (|S| - 2) & \leq \sum_{t \neq q} s_t \leq 2 \cdot (p-2) \\ \Longrightarrow \quad (|S| - 1)^2 & \leq 2p - 3 \\ \Longrightarrow \quad |S| & < \sqrt{2p} + 1. \end{aligned}

Solution 2

1. Let p p be a prime number such that p12 \frac{p-1}{2} is also prime. Define q=p12 q = \frac{p-1}{2} . We are given that a,b,c a, b, c are integers not divisible by p p . Without loss of generality, we can assume c=1 c = 1 by scaling.

2. Define the set SZ/(p1)Z S \subset \mathbb{Z}/(p-1)\mathbb{Z} to be the set of all n n such that an+bn1(modp) a^n + b^n \equiv -1 \pmod{p} .

3. We first consider the case where ordp(a/b)=1 \mathrm{ord}_p(a/b) = 1 . This implies a=b a = b . In this case, we need an1/2(modp) a^n \equiv -1/2 \pmod{p} . Since p2,3 p \neq 2, 3 , 1/2∉{1,1}(modp) -1/2 \not\in \{-1, 1\} \pmod{p} . Therefore, at most two values of n n satisfy this condition.

4. Next, consider the case where ordp(a/b)=2 \mathrm{ord}_p(a/b) = 2 . This implies a=b a = -b . In this case, we need n n to be even, which yields the same equation as before. Hence, ordp(a/b){q,2q} \mathrm{ord}_p(a/b) \in \{q, 2q\} .

5. Claim: Each difference between distinct elements of S S shows up at most twice, except for q q .

6. Proof of Claim: Suppose we have kl k \neq l (in Z/(p1)Z \mathbb{Z}/(p-1)\mathbb{Z} ) with k,l,k+d,l+dS k, l, k+d, l+d \in S for some d0 d \neq 0 . This implies:
al+dbk+akbl+dak+dbl+albk+d(modp) a^{l+d}b^k + a^k b^{l+d} \equiv a^{k+d}b^l + a^l b^{k+d} \pmod{p}
Simplifying, we get:
akbl(adbd)albk(adbd)(modp) a^k b^l (a^d - b^d) \equiv a^l b^k (a^d - b^d) \pmod{p}
Hence, either (a/b)d1(modp) (a/b)^d \equiv 1 \pmod{p} or (a/b)kl1(modp) (a/b)^{k-l} \equiv 1 \pmod{p} . If dq d \neq q , then this means kl=q k - l = q , which implies the desired claim. \blacksquare

7. For any element of S S , there are at least S2 |S| - 2 other elements which don't differ from it by q q . Hence, we need:
S(S2)2(p2) |S|(|S| - 2) \leq 2(p - 2)
Solving for S |S| , we get:
S22S2(p2) |S|^2 - 2|S| \leq 2(p - 2)
S22S2(p2)0 |S|^2 - 2|S| - 2(p - 2) \leq 0
Solving this quadratic inequality, we find:
S1+2p |S| \leq 1 + \sqrt{2p}

The final answer is 1+2p \boxed{ 1 + \sqrt{2p} }

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.