Olympiad Maths Prep

Track / Stage 6 / 335 of 400 #1335 of 2000

Problem 1335

National olympiad, first round
Number theory Difficulty 6.7 Prove it

For all nNn \in \mathbb{N}, show that the number of integral solutions (x,y)(x, y) of x2+xy+y2=nx^{2}+xy+y^{2}=n is finite and a multiple of 66.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. Finiteness of Solutions:
We start by showing that the number of integral solutions (x,y)(x, y) of the equation x2+xy+y2=nx^2 + xy + y^2 = n is finite.

Given n=x2+xy+y2n = x^2 + xy + y^2, we can use the inequality:
n=x2+xy+y2x2+xy+y2(x+y)2 n = x^2 + xy + y^2 \leq |x^2| + |xy| + |y^2| \leq (|x| + |y|)^2
This implies:
x,yn |x|, |y| \leq \sqrt{n}
Therefore, the possible values for xx and yy are bounded by n\sqrt{n}, which means there are finitely many pairs (x,y)(x, y) that satisfy the equation.

2. Bound on the Number of Solutions:
Since x,yn|x|, |y| \leq \sqrt{n}, the number of possible pairs (x,y)(x, y) is bounded by:
(2n+1)24n+4n+1 (2\sqrt{n} + 1)^2 \approx 4n + 4\sqrt{n} + 1
This gives an upper bound on the number of solutions.

3. Assignment to Complex Numbers:
To each pair (x,y)(x, y), we assign the complex number x+yζ6Cx + y\zeta_6 \in \mathbb{C}, where ζ6=1+i32\zeta_6 = \frac{1 + i\sqrt{3}}{2} is a primitive 6th root of unity. This assignment is unique and bijective if x,yRx, y \in \mathbb{R}.

4. Modulus Calculation:
We calculate the modulus:
x+yζ62=x2+xy+y2=n |x + y\zeta_6|^2 = x^2 + xy + y^2 = n
This shows that if x+yζ6x + y\zeta_6 has modulus n\sqrt{n}, then the equation x2+xy+y2=nx^2 + xy + y^2 = n holds.

5. Generating Six Solutions:
Consider the six numbers ak+bkζ6=ζ6k(x+yζ6)a_k + b_k\zeta_6 = \zeta_6^k (x + y\zeta_6) for k=0,1,,5k = 0, 1, \ldots, 5. Since ζ6=1|\zeta_6| = 1 and ζ6k=1    6k\zeta_6^k = 1 \iff 6|k, all these numbers are different and have the same modulus squared nn.

6. Integer Solutions:
We need to show that all ai,bia_i, b_i are integers. For k=1k = 1:
a1=y,b1=x+y a_1 = -y, \quad b_1 = x + y
Since x,yZx, y \in \mathbb{Z}, it follows that a1,b1Za_1, b_1 \in \mathbb{Z}. By similar calculations, all ai,bia_i, b_i are integers.

7. Grouping Solutions:
We can group the solutions into sets of six, showing that the number of solutions is a multiple of 6.

8. Stronger Result Using Eisenstein Integers:
The number of integer solutions n>0n > 0 can be written as x2+xy+y2x^2 + xy + y^2 (with x,yZx, y \in \mathbb{Z}) in exactly:
6(dnd1mod31dnd2mod31) 6 \cdot \left( \sum_{\substack{d|n \\ d \equiv 1 \mod 3}} 1 - \sum_{\substack{d|n \\ d \equiv 2 \mod 3}} 1 \right)
If there is one or more prime divisor p2mod3p \equiv 2 \mod 3 dividing nn an odd number of times, then this count is 0. Otherwise, it equals:
6pPp1mod3(vp(n)+1) 6 \prod_{\substack{p \in \mathbb{P} \\ p \equiv 1 \mod 3}} \left( v_p(n) + 1 \right)

\blacksquare

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