Skip to main content

2014 AIME I Problem 8

Problem 8 of 15IntermediateNumber Theory

The positive integers NN and N2N^2 both end in the same sequence of four digits abcdabcd when written in base 10,10, where digit aa is not zero. Find the three-digit number abc.abc.

Your answer

Integer from 0 to 999
Show solution

Solution

The condition is N2≡N(mod104),N^2 \equiv N \pmod{10^4}, that is, N(N−1)≡0(mod24⋅54).N(N-1) \equiv 0 \pmod{2^4 \cdot 5^4}. Since consecutive integers are coprime, 1616 divides one of N,N, N−1N - 1 and 625625 divides one of them. This gives four cases modulo 10000:10000: N≡0,N \equiv 0, N≡1,N \equiv 1, N≡625N \equiv 625 (which is 00 mod 625625 and 11 mod 1616), and N≡9376N \equiv 9376 (which is 00 mod 1616 and 11 mod 625625). The last four digits abcdabcd must have a≠0,a \ne 0, which rules out 0000,0000, 0001,0001, and 0625.0625. So abcd=9376abcd = 9376 — for instance 93762=879093769376^2 = 87909376 — and abc=937.abc = 937.
AoPS wiki

Tagged: modular arithmetic · Chinese Remainder Theorem · digits

More practice