Olympiad Maths Prep

Track / Stage 6 / 255 of 400 #1255 of 2000

Problem 1255

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

How many integers nn with 0n<8400\leq n < 840 are there such that 840840 divides n8n4+n1n^8-n^4+n-1?

$ \textbf{(A)}\ 1
\qquad\textbf{(B)}\ 2
\qquad\textbf{(C)}\ 3
\qquad\textbf{(D)}\ 6
\qquad\textbf{(E)}\ 8
$

Official solution

1. First, we note that 840=3578 840 = 3 \cdot 5 \cdot 7 \cdot 8 . We need to find the integers n n such that 0n<840 0 \leq n < 840 and 840 840 divides n8n4+n1 n^8 - n^4 + n - 1 . This means we need n8n4+n10(mod840) n^8 - n^4 + n - 1 \equiv 0 \pmod{840} .

2. We will consider the congruences modulo 3 3 , 5 5 , 7 7 , and 8 8 separately.

3. Modulo 3:
- Since n21(mod3) n^2 \equiv 1 \pmod{3} for n n such that gcd(n,3)=1 \gcd(n, 3) = 1 , we have:
n81(mod3),n41(mod3) n^8 \equiv 1 \pmod{3}, \quad n^4 \equiv 1 \pmod{3}
n8n4+n111+n1n1(mod3) n^8 - n^4 + n - 1 \equiv 1 - 1 + n - 1 \equiv n - 1 \pmod{3}
Therefore, n1(mod3) n \equiv 1 \pmod{3} .

4. Modulo 5:
- Since n41(mod5) n^4 \equiv 1 \pmod{5} for n n such that gcd(n,5)=1 \gcd(n, 5) = 1 , we have:
n81(mod5),n41(mod5) n^8 \equiv 1 \pmod{5}, \quad n^4 \equiv 1 \pmod{5}
n8n4+n111+n1n1(mod5) n^8 - n^4 + n - 1 \equiv 1 - 1 + n - 1 \equiv n - 1 \pmod{5}
Therefore, n1(mod5) n \equiv 1 \pmod{5} .

5. Modulo 8:
- Since φ(8)=4 \varphi(8) = 4 , we have n41(mod8) n^4 \equiv 1 \pmod{8} for n n such that gcd(n,8)=1 \gcd(n, 8) = 1 , we have:
n81(mod8),n41(mod8) n^8 \equiv 1 \pmod{8}, \quad n^4 \equiv 1 \pmod{8}
n8n4+n111+n1n1(mod8) n^8 - n^4 + n - 1 \equiv 1 - 1 + n - 1 \equiv n - 1 \pmod{8}
Therefore, n1(mod8) n \equiv 1 \pmod{8} .

6. Modulo 7:
- Since n61(mod7) n^6 \equiv 1 \pmod{7} , we have:
n8n2(mod7),n4n2(mod7) n^8 \equiv n^2 \pmod{7}, \quad n^4 \equiv n^2 \pmod{7}
n8n4+n1n2n2+n1n1(mod7) n^8 - n^4 + n - 1 \equiv n^2 - n^2 + n - 1 \equiv n - 1 \pmod{7}
Therefore, n1(mod7) n \equiv 1 \pmod{7} or n3(mod7) n \equiv 3 \pmod{7} .

7. Combining the congruences using the Chinese Remainder Theorem:
- For n1(mod3) n \equiv 1 \pmod{3} , n1(mod5) n \equiv 1 \pmod{5} , n1(mod8) n \equiv 1 \pmod{8} , and n1(mod7) n \equiv 1 \pmod{7} :
n1(mod840) n \equiv 1 \pmod{840}
This gives us n=1 n = 1 .

- For n1(mod3) n \equiv 1 \pmod{3} , n1(mod5) n \equiv 1 \pmod{5} , n1(mod8) n \equiv 1 \pmod{8} , and n3(mod7) n \equiv 3 \pmod{7} :
Using the Chinese Remainder Theorem, we find another solution n n in the interval 0n<840 0 \leq n < 840 .

8. Therefore, there are two solutions in total.

The final answer is 2\boxed{2}.

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