Maths Olympiad Prep

Library / /786 of 860

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. Spacing and $ signs are ignored.

Solution

Rewrite the sum as x2+xy+y2106(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+y2106x^{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)234x2x^{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 x23103|x| \leq \frac{2}{\sqrt{3}} 10^{3}. Similarly, y23103|y| \leq \frac{2}{\sqrt{3}} 10^{3}. Therefore, the number of terms in the sum is at most (43103+1)2106\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 110121 \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+y2106(x2+xy+y2)x2+xy+y2106(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,tan1(v/u))(r, \theta)=\left(\sqrt{u^{2}+v^{2}}, \tan ^{-1}(v / u)\right) yields x2+xy+y2106(x2+xy+y2)dydx=23u2+v2106(u2+v2)dvdu=2302π0103r3drdθ=4π30103r3dr=π31012\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.813810121.8138 \cdot 10^{12}, which is much closer to the actual answer. (An answer of 1.810121.8 \cdot 10^{12} is good enough for full credit.)

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

Source: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.