MathCastle
Number TheorySuperchallengeThe Chinese Remainder Theorem

The Chinese Remainder Theorem · Superchallenge problem

For how many integers aa with 0≤a<10010 \le a < 1001 does the congruence x2≡a(mod1001)x^2 \equiv a \pmod{1001} have exactly 44 solutions xx with 0≤x<10010 \le x < 1001? (Here 1001=7⋅11⋅131001 = 7 \cdot 11 \cdot 13.)