Maths Olympiad Prep

Track / Stage 5 / 313 of 400 #913 of 1964

Problem 913

AIME late
Algebra Difficulty 5.6 Find the answer

(2004 Singapore Mathematical Olympiad) Find the number of ordered integer pairs (a,b)(a, b) such that x2+x^{2}+ ax+b=167ya x+b=167 y has integer solutions (x,y)(x, y), where 1a,b20041 \leqslant a, b \leqslant 2004.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Next problem →

Official solution

First, prove a lemma.
Lemma: If pp is an odd prime, when xx runs through a complete residue system modulo pp, x2x^{2} modulo pp can take exactly p+12\frac{p+1}{2} values from 0,1,,p10, 1, \cdots, p-1.
Proof of the lemma: When x0(modp)x \equiv 0(\bmod p), x20(modp)x^{2} \equiv 0(\bmod p).
When p×xp \times x,
if x12x22(modp),x1x2(modp)x_{1}^{2} \equiv x_{2}^{2}(\bmod p), x_{1} \neq x_{2}(\bmod p), then
p(x1+x2)(x1x2),p(x1+x2). p\left|\left(x_{1}+x_{2}\right)\left(x_{1}-x_{2}\right), p\right|\left(x_{1}+x_{2}\right).

Thus, x1x2(modp)x_{1} \equiv -x_{2}(\bmod p).
This way, 1,2,,p11, 2, \cdots, p-1 can be divided into p12\frac{p-1}{2} groups
(1,p1),(2,p2),,(p12,p+12). (1, p-1), (2, p-2), \cdots, \left(\frac{p-1}{2}, \frac{p+1}{2}\right).

The squares of numbers in the same group are congruent modulo pp, and the squares of numbers in different groups are not congruent modulo pp.
Therefore, the quadratic residues can take exactly 1+p12=p+121+\frac{p-1}{2}=\frac{p+1}{2} values.
Next, solve the original problem.
When there exists xZx \in \mathbf{Z} such that x2+ax+b0(mod167)x^{2} + a x + b \equiv 0(\bmod 167), then there is an integer solution (x,y)(x, y), i.e.,
4x2+4ax+4b0(mod167)4 x^{2} + 4 a x + 4 b \equiv 0(\bmod 167),
a24b(2x+a)2(mod167)a^{2} - 4 b \equiv (2 x + a)^{2}(\bmod 167).
Therefore, for a given value of aa, a24ba^{2} - 4 b is a quadratic residue modulo 167.
By the lemma, a24ba^{2} - 4 b modulo 167 can take 84 different values, so bb modulo 167 can take 84 different values.
Since 2004167=12\frac{2004}{167} = 12, each aa corresponds to 84×1284 \times 12 values of bb that satisfy the requirement, thus, there are
2004×84×12=2020032 2004 \times 84 \times 12 = 2020032

ordered integer pairs.
The sequence a0,a1,a2,a_{0}, a_{1}, a_{2}, \cdots is defined as follows:
For all k(k0)k (k \geqslant 0),
a0=2,ak+1=2ak21 a_{0} = 2, a_{k+1} = 2 a_{k}^{2} - 1

Source: NuminaMath-1.5, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.