Maths Olympiad Prep

Library / HMMT February /1001 of 1302

HMMT February

Algebra Difficulty 5.6 AIME, harder Find the answer

For an integer nn, let f(n)f(n) denote the number of pairs (x,y)(x, y) of integers such that x2+xy+y2=nx^{2}+x y+y^{2}=n. Compute the sum ∑n=1106nf(n)\sum_{n=1}^{10^{6}} n f(n)

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

Solution

Rewrite the sum as ∑x2+xy+y2≤106(x2+xy+y2)\sum_{x^{2}+x y+y^{2} \leq 10^{6}}\left(x^{2}+x y+y^{2}\right) where the sum is over all pairs (x,y)(x, y) of integers with x2+xy+y2≤106x^{2}+x y+y^{2} \leq 10^{6}. We can find a crude upper bound for this sum by noting that x2+xy+y2=34x2+(x2+y)2≥34x2x^{2}+x y+y^{2}=\frac{3}{4} x^{2}+\left(\frac{x}{2}+y\right)^{2} \geq \frac{3}{4} x^{2} so each term of this sum has ∣x∣≤23103|x| \leq \frac{2}{\sqrt{3}} 10^{3}. Similarly, ∣y∣≤23103|y| \leq \frac{2}{\sqrt{3}} 10^{3}. Therefore, the number of terms in the sum is at most (43103+1)2≈106\left(\frac{4}{\sqrt{3}} 10^{3}+1\right)^{2} \approx 10^{6}. (We are throwing away "small" factors like 163\frac{16}{3} in the approximation.) Furthermore, each term in the sum is at most 10610^{6}, so the total sum is less than about 101210^{12}. The answer 1⋅10121 \cdot 10^{12} would unfortunately still get a score of 0. For a better answer, we can approximate the sum by an integral: ∑x2+xy+y2≤106(x2+xy+y2)≈∬x2+xy+y2≤106(x2+xy+y2)dydx\sum_{x^{2}+x y+y^{2} \leq 10^{6}}\left(x^{2}+x y+y^{2}\right) \approx \iint_{x^{2}+x y+y^{2} \leq 10^{6}}\left(x^{2}+x y+y^{2}\right) d y d x. Performing the change of variables (u,v)=(32x,12x+y)(u, v)=\left(\frac{\sqrt{3}}{2} x, \frac{1}{2} x+y\right) and then switching to polar coordinates (r,θ)=(u2+v2,tan⁡−1(v/u))(r, \theta)=\left(\sqrt{u^{2}+v^{2}}, \tan ^{-1}(v / u)\right) yields ∬x2+xy+y2≤106(x2+xy+y2)dydx=23∬u2+v2≤106(u2+v2)dvdu=23∫02π∫0103r3drdθ=4π3∫0103r3dr=π3⋅1012\iint_{x^{2}+x y+y^{2} \leq 10^{6}}\left(x^{2}+x y+y^{2}\right) d y d x =\frac{2}{\sqrt{3}} \iint_{u^{2}+v^{2} \leq 10^{6}}\left(u^{2}+v^{2}\right) d v d u =\frac{2}{\sqrt{3}} \int_{0}^{2 \pi} \int_{0}^{10^{3}} r^{3} d r d \theta =\frac{4 \pi}{\sqrt{3}} \int_{0}^{10^{3}} r^{3} d r =\frac{\pi}{\sqrt{3}} \cdot 10^{12}. This is approximately 1.8138⋅10121.8138 \cdot 10^{12}, which is much closer to the actual answer. (An answer of 1.8⋅10121.8 \cdot 10^{12} is good enough for full credit.)

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

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