Skip to main content

AMC 12 Mock Exam 8 Problem 20

Problem 20 of 25

For how many integers nn with 1≤n≤10001\le n\le1000 do the numbers nn and n5n^5 leave the same remainder when divided by 10001000? For example, n=1n=1 and n=1000n=1000 have this property, but n=2n=2 does not, because 22 and 3232 leave different remainders.

Answer choices

Show solution

Solution

We need 1000∣n5−n=n(n−1)(n+1)(n2+1)1000\mid n^5-n=n(n-1)(n+1)(n^2+1). By the Chinese Remainder Theorem the number of good residues mod 10001000 is the product of the counts mod 125125 and mod 88, and 1≤n≤10001\le n\le1000 is one full set of residues.

Mod 8. If nn is even, then n4−1n^4-1 is odd, so 8∣n8\mid n: one residue. If nn is odd, n2≡1(mod8)n^2\equiv1\pmod8, so n4≡1n^4\equiv1 and n5≡nn^5\equiv n: all 44 odd residues. That is 55 residues.

Mod 125. Any two of the factors nn, n−1n-1, n+1n+1, n2+1n^2+1 have no common factor 55: the first three differ pairwise by 11 or 22; gcd⁡(n,n2+1)=1\gcd(n,n^2+1)=1; and (n2+1)−(n−1)(n+1)=2(n^2+1)-(n-1)(n+1)=2. So 125125 must divide one factor: n≡0n\equiv0, n≡1n\equiv1, n≡−1n\equiv-1, or n2≡−1(mod125)n^2\equiv-1\pmod{125}. The last congruence has exactly two solutions: 572=3249=26⋅125−157^2=3249=26\cdot125-1, so ±57\pm57 work, and if x2≡y2≡−1x^2\equiv y^2\equiv-1 then 125∣(x−y)(x+y)125\mid(x-y)(x+y) while 55 cannot divide both factors (it would divide 2x2x, hence xx, but x2≡−1x^2\equiv-1), so x≡±yx\equiv\pm y. That is 3+2=53+2=5 residues, all distinct.

The answer is 5⋅5=255\cdot5=\boxed{25}. (Forgetting the roots of n2≡−1n^2\equiv-1 gives 1515; forgetting n≡0(mod8)n\equiv0\pmod8 gives 2020.)

Tagged: counting solutions of a quintic congruence modulo 1000 (CRT, square roots of -1)