Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 2.42 KB

p0094.md

File metadata and controls

90 lines (65 loc) · 2.42 KB

[<] [^] | [>]

Problem 94: Almost Equilateral Triangles

The link to the problem

My approach

I solved this problem by using Heron's formula and Pell's equation.

First, I show that the length of the third side (whose length doesn't match others) is even. Let $a, a, b \in \mathbb{Z} : a &gt; 0, \ b &gt; 0$ are side lengths of triangle. From Heron's formula, given $s = \dfrac{a + a + b}{2} = \dfrac{2a + b}{2}$ and the area of a triangle $S$ is below.

$$ \begin{align} S & = \sqrt{s(s-a)(s-a)(s-b)} \\ & = \sqrt{\frac{2a + b}{2} \cdot \frac{b}{2} \cdot \frac{b}{2} \cdot \frac{2a-b}{2}} \\ & = \sqrt{\frac{b^{2} \cdot (4a^{2}-b^{2})}{16}} \\ & = \frac{b}{4} \sqrt{4a^{2} - b^{2}} \end{align} $$

Since $S$ is integer, $b$ must be even.

We know the length of the third side is even, assume that $m, m, 2n$ are side lengths of triangle. There are two cases: $m=2n+1$ and $m=2n-1$.

case #1: m = 2n + 1

Similarly, from Heron's formula

$$ \begin{align} s & = \frac{2(2n+1) + 2n}{2} \\ & = 3n + 1\\ S & = \sqrt{(3n+1) \cdot (3n+1 - (2n+1)) \cdot (3n+1 - (2n+1)) \cdot (3n+1 - 2n)} \\ & = \sqrt{(3n+1) \cdot n \cdot n \cdot (n+1)} \\ & = n \sqrt{(3n+1)(n+1)} \end{align} $$

$S$ must be integer, so let $k^{2} = (3n+1)(n+1)$

$$ \begin{align} k^{2} & = 3n^{2} + 4n + 1 \\ \rightarrow 3k^{2} & = 9n^{2} + 12n + 3 \\ & = (3n + 2)^{2} - 1 \end{align} $$

$$\therefore (3n+2)^{2} - 3k^{2} = 1$$

The above equation is a Pell's equation $X^{2} - 3Y^{2} = 1 \ (X=3n+2, \ Y=k)$.

case #2: m = 2n - 1

Similarly, from Heron's formula

$$ \begin{align} s & = \frac{2(2n-1) + 2n}{2} \\ & = 3n - 1\\ S & = \sqrt{(3n-1) \cdot (3n-1 - (2n-1)) \cdot (3n-1 - (2n-1)) \cdot (3n-1 - 2n)} \\ & = \sqrt{(3n-1) \cdot n \cdot n \cdot (n-1)} \\ & = n \sqrt{(3n-1)(n-1)} \end{align} $$

$S$ must be integer, so let $k^{2} = (3n-1)(n-1)$

$$ \begin{align} k^{2} & = 3n^{2} - 4n + 1 \\ \rightarrow 3k^{2} & = 9n^{2} - 12n + 3 \\ & = (3n - 2)^{2} - 1 \end{align} $$

$$\therefore (3n-2)^{2} - 3k^{2} = 1$$

The above equation is a Pell's equation $X^{2} - 3Y^{2} = 1 \ (X=3n-2, \ Y=k)$.

From the problem 64, we already know $\sqrt{3} = [1; \ (1,2)]$. Now that all remains is to find non-trivial solutions of the above Pell's equation.