Let $H$ be the orthocentre and $O$ the circumcentre of a triangle $ABC$ with the length of side $BC$ equal to $2018$ . Cevians are constructed from vertices $B$ and $C$ so as to be tangent to $\gamma$ , the circle passing through $A$ and $H$ and congruent to the circle centred at $O$ and tangent to $BC$ .

Let the cevians through $B$ and $C$ touch the circle $\gamma$ at $T$ and $U$ respectively. If $BT$ and $CU$ are of integer lengths, what is their sum?

The answer is 2798.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Neither Maria's proof nor the proof in the previous problem explain

whywe obtain the Pythagorean triples needed. Let us see how to solve the equation $m^2 + n^2 = 2018^2$ for $m,n \in \mathbb{N}$ . We need to solve $(m + in)(m - in) \; = \; 2^2 \times 1009^2 \; = \; -(1 + i)^4(28 + 15i)^2(28-15i)^2$ where $1 + i$ and $28 + 15i$ are irreducible in the Euclidean domain $\mathbb{Z}[i]$ . These numbers are irreducible because $N(1+i) = 2$ and $N(28+15i) = 1009$ are prime numbers, where $N(a+bi) = a^2 + b^2$ is the distance function in $\mathbb{Z}[i]$ . If $u \in \mathbb{Z}[i]$ is a prime factor of $m + in$ , then its complex conjugate $u^\star$ must be a factor of $m - in$ .This means that there are two options. Either $m + ni$ is a unit in $\mathbb{Z}[i]$ times $(1+i)^2(28+15i)(28-15i) = 2018i$ , or else $m + ni$ is a unit in $\mathbb{Z}[i]$ times $(1+i)^2(28 + 15i)^2 = -1680 + 1118 i$ . Thus either $\{m,n\} = \{2018,0\}$ , or else $\{m,n\} = \{1680,1118\}$ . Only the second solution is physically reasonable for this problem.