Show that there are only two values of N for which (4N+1)(x_{1}^{2} + x_{2}^{2} + ... + x_{N}^{2})= 4(x_{1} + x_{2} + ... + x_{N})^{2} + 4N + 1 has an integer solution x_{i}.

**Answer**

N = 2 has the solution 9(1^{2} + 2^{2}) = 4(1 + 2)^{2} + 9.

N = 6 has the solution 25(1^{2} + 1^{2} + 1^{2} + 1^{2} + 1^{2} + 0^{2}) = 4(1 + 1 + 1 + 1 + 1 + 0)^{2} + 25.

**Solution**

Suppose every x_{i} is 0 or 1. Suppose there are M 1s. Then we have (4N+1)M = 4M^{2} + 4N+1, so (4N+1)(M-1) = 4M^{2}. Since 4N+1 is odd, 4 must divide M-1. So M is odd. So 8 does not divide M-1. Since M-1 and M are coprime, no prime p > 2 can divide M-1. Hence M = 5. So N = 6. That is a possible solution (as shown explicitly above).

If x_{i} is a solution, then -x_{i} is also a solution. So let us assume that ∑ x_{i} ≥ 0. If some x_{i} is not 0 or 1, then either some x_{i} is negative, or some x_{i} > 1. In either case we have x_{i}^{2} > x_{i}, so ∑ x_{i} < ∑ x_{i}^{2}. Put X = ∑ x_{i}. Then X + 1 ≤ ∑ x_{i}^{2} = (4/(4N+1) X^{2} + 1, so X ≥ (4N+1)/4 and hence X ≥ N+1.

By Cauchy, we have X^{2} ≤ N ∑ x_{i}^{2} = (4N/(4N+1) X^{2} + N, so X^{2} ≤ N(4N+1), so X ≤ 2N. Hence 1 < X/N ≤ 2.

We have ∑ (x_{i} - X/N)^{2} = (∑ x_{i}^{2}) - X^{2}/N = 1 - X^{2}/(N(4N+1)) < 1. Hence each |x_{i} - X/N| < 1. Hence 0 < x_{i} < 3. But x_{i} is an integer, so it must be 1 or 2. Suppose there are M 1s. Then there are N-M 2s and we have: 4MN - 3M - 4M^{2} - 1 = 0. Hence M divides 1, so M = 1. Hence N = 2, and we have the other solution shown above.

© John Scholes

jscholes@kalva.demon.co.uk

30 Dec 2002

Last corrected/updated 30 Dec 02