Let's learn how to find the integer solutions of a three variable equation.
Problem: Consider the following equation: \( (x-y)^2 + (y-z)^2 + (z - x)^2 = 2018 \). Find the integer solutions to this three variable equation.
Discussion: Set x - y = a, y - z = b. Then z - x = - (a+b). Clearly, we have, \( a^2 + b^2 + (-(a+b))^2 = 2018 \). Simplifying we have \( a^2 + b^2 + ab = 1009 \). Now, treating this as a quadratic in a, we have:
$$ a^2 + ba + b^2 - 1009 = 0 $$
Hence \( a = \frac{-b \pm \sqrt{b^2 - 4(b^2 - 1009)}}{2} = \frac{-b \pm \sqrt{4 \times 1009 - 3b^2}}{2} \)
Since a is an integer, we must have \( 4 \times 1009 - 3b^2 \) (the discriminant) to be a positive perfect square integer. This severely limits the number of possibilities for b. For example, we need \( b^2 \le \frac{4 \times 1009}{3} \) or \( b \le 36 \). So one may 'check' for these 36 values.
Only b = 35 works. Then \( a = \frac{-35 \pm \sqrt{4 \times 1009 - 3\times 35^2}}{2} \). But this makes \( a \) negative.
Reducing the number of cases:
Computation using Haskell

In 2025, 8 students from Cheenta Academy cracked the prestigious Regional Math Olympiad. In this post, we will share some of their success stories and learning strategies. The Regional Mathematics Olympiad (RMO) and the Indian National Mathematics Olympiad (INMO) are two most important mathematics contests in India.These two contests are for the students who are […]

Cheenta Academy proudly celebrates the success of 27 current and former students who qualified for the Indian Olympiad Qualifier in Mathematics (IOQM) 2025, advancing to the next stage — RMO. This accomplishment highlights their perseverance and Cheenta’s ongoing mission to nurture mathematical excellence and research-oriented learning.

Cheenta students shine at the Purple Comet Math Meet 2025 organized by Titu Andreescu and Jonathan Kanewith top national and global ranks.

Celebrate the success of Cheenta students in the Stanford Math Tournament. The Unified Vectors team achieved Top 20 in the Team Round.
But the Question doesn't says it should be a positive integer??
So 35 can be the ans!
Yes. Once we restrict ourselves to positive solutions. It won't be difficult to track down the negative ones.