# Tag Archives: number theory

## The Thrill of the Chase

“We need these experiences — noticing patterns, making conjectures, struggling with them mostly unaided by the teacher, researching appropriate related material, crafting a series of flawed-but-each-one-better-than-the-last arguments for why the conjecture could be true, creating a good logical argument and then tweaking it to be airtight — to be the essence of mathematics learning from a young age.”

Appropriately, after writing that yesterday, I got caught up this afternoon in a challenging math question posed by @CmonMattTHINK: “Are there any triangles w/ integer side lengths and exactly one 60° angle?”

If you want to think more about this question yourself, stop reading. I intend to describe my thought processes and answer here, in the interests of thinking through how to create or encourage those thought processes in students.

#### Mathematical Problem-Solving and Proof

These two processes should not be separated, since they are so intimately connected.

I began actually by stumbling halfway into a conversation of other people. @DrMathochist suggested using the law of cosines to create a Diophantine equation:

$c^2 = a^2 + b^2 - ab.$

Then @k8nowak discovered a triple of sides that worked: (3, 8, 7). Note that $3^2 + 8^2 - 3 \cdot 8 = 9 + 64 - 24 = 49 = 7^2$ and that the resulting triangle does indeed have a 60° angle. And @calcdave used the law of sines to express side $a$ in terms of side $b$ and the angle across from $b$ (with a sign error).

Noticing Patterns. At this point, I embarked on my own quest to solve the problem. I noticed that clearly any integer multiples of (3, 8, 7) — like (6, 16, 14) — will also satisfy our equation (of course they will, since they will be similar to the above-linked triangle and therefore also have an angle of 60°). Thus, there are in fact infinitely many triangles that fit @CmonMattTHINK’s question. Rather than stopping there with this answer to the original question, though, it makes sense to ask if there are any other triangles which are not multiples of (3, 8, 7) — that is, going forth we can limit our search to primitive triples wherein the greatest common divisor of the three sides is 1.

Failed Proofs and Stumbling in Wrong Directions. Next, I am embarrassed to say I spent a while using the law of sines (along the track that @calcdave had suggested) to prove that $3=3.$ I should have recognized (but didn’t) when I set two complicated trigonometric expressions equal that had just come from different sides of the law of sines. Then I tried factoring the Diophantine equation above to get $c^2 = (a + \zeta b)(a + \zeta^2 b)$, where $\zeta = \frac{-1+\sqrt{-3}}{2}$ is a cube root of unity. Which led nowhere. Finally, I desperately tried looking at the continued fractions and rational approximations for some irrational numbers that were close to the ratios 3/8, 3/7, etc. No luck. The continued fractions I sought are shown below, using the software Pari/GP.

More Patterns. At this point, I considered writing a program to do a brute force search for more triples. But more handy at the moment was Microsoft Excel, where I could display a number of combinations of $a,$ $b,$ and $a^2 + b^2 - ab,$ and search visually for any that I saw to be perfect squares. I hoped to notice some patterns that could fuel my further work. I found (5, 8, 7), and in general saw that if $(a, b, c)$ is a triple, then $(b-a, b, c)$ will also be a triple (assuming $b>a$). Also encountered were (7, 15, 13) and (5, 21, 19), together with their complements (8, 15, 13) and (16, 21, 19). A piece of my spreadsheet is seen below.

Research. At this point, remembering back to the proof and generation of infinitely many primitive Pythagorean triples from the unit circle, I divided through the Diophantine equation by $c^2$ to get a planar curve $1 = x^2 + y^2 - x y$ on which to look for rational points $(x, y) = (a/c, b/c).$ I graphed this curve in GeoGebra, and plotted the points associated with the triples I had found, as seen here.

I realized that the only rational points on this curve (ellipse?) that I need be concerned with were in the 45° half-quadrant where you see the cluster of points, between (0,1) and (1,1). Clearly negative rational numbers are irrelevant to the sides of a triangle, and the points to the right of (1,1) on the downslope to (1,0) were just rearrangements of which side of the triangle got called $a$ or $b.$

Toward a Solution. OK, we’re in the home stretch now. I pretty much just followed along with what I remembered of the Pythagorean-circle proof. I picked the simplest rational point that I knew was on the curve: (0,1), which doesn’t correspond to any actual triangle, but will soon produce triangles by the method of drawing lines through it. We shall see shortly that lines with rational slope through (0,1) will intersect the curve at rational points (i.e. points where both $x$ and $y$ are rational, and thus yielding solutions to our goals of integer solutions of $c^2 = a^2 + b^2 - a b$ and triangles with angles of 60°).

Note that a slope of 0 through (1,0) would go through (1,1), which represents the equilateral triangle where all angles are 60°. (1,1) is also the point of reflection symmetry, past which we need not go unless we care about the order of $(a,b).$ At (0,1) the curve has instantaneous slope $\frac{dy}{dx} = \frac{1}{2},$ so larger slopes than $\frac{1}{2}$ will intersect the curve in other quadrants. Thus, choosing rational slope $m = p/q \in (0, \frac{1}{2}),$ the line’s equation using good-old point-slope form will be $y = m x + 1.$

Combining this with the curve’s equation and solving for $x,$ we get:

$1 = x^2 + y^2 - x y$

$1 = x^2 + (m x + 1)^2 - x (m x + 1)$

$1 = x^2 + m^2 x^2 + 2 m x + 1 - m x^2 - x$

$0 = x (x + m^2 x + 2 m - m x -1)$

$0 = x + m^2 x + 2 m - m x -1$

$1 - 2m = m^2 x - m x + x$

$x = \frac{1 - 2 m}{m^2 - m + 1}$

Note that $x$ is nonzero because our triangle must have sides that are nonzero.

Although $m$ is rational and constrained to the interval $(0,\frac{1}{2}),$ we’d actually like to express it in terms of natural numbers $p$ and $q,$ where we require that $gcd(p,q)=1$ and $2p < q.$ Leaving aside the messy algebra, we substitute $p/q$ in for $m$ above, and get that:

$x = \frac{q^2 - 2 p q}{p^2 - p q + q^2},$ and $y = \frac{q^2 - p^2}{p^2 - p q + q^2},$ which correspond to sides of the triangle

$(a, b, c) = (q^2 - 2 p q, q^2 - p^2, p^2 - p q + q^2).$

I verified that these expressions do in fact satisfy the relation $c^2 = a^2 + b^2 - a b,$ thus completing the proof that there are infinitely many primitive triples of sides that form a triangle with one 60° angle. [A few easily verifiable details have been left out here.] In fact, not only do we know there are infinitely many, but we can generate them at will. Just pick natural numbers $p$ and $q$ that have no common divisors and where $q$ is more than twice as big as $p.$ Then the triple given above, $(a, b, c) = (q^2 - 2 p q, q^2 - p^2, p^2 - p q + q^2),$ will form a triangle with a single angle of 60°.

The Role of Counterexample in Proof. In trying to prove that this method would always generate a primitive triple (which I believed at first), I actually found a counterexample! For example, $p = 1, q = 5$ yields $(a, b, c) = (15, 24, 21),$ which is a multiple of 3 times the primitive triple (5, 8, 7). But it doesn’t seem that (5, 8, 7) can ever be generated using this method.

I’m pretty sure I have proved that this can only arise if the sum $p + q$ is divisible by 3. If so, this method will generate a triple of numbers thrice a primitive triple. That is, the numbers generated do indeed form a triangle with integer sides and a 60° angle, but which triangle dilated by 1/3 will still satisfy the same criteria. We can call these triple triples, since the triple generated is triple (i.e. three times) a primitive triple.

If the sum $p + q$ is congruent to 1 or 2, modulo 3, then the triple generated will indeed be primitive.

Open Questions (Unknown by me, anyway).

• Is there an alternative method which always generates primitive triples?
• Can my method ever generate (5, 8, 7) or any other of the primitive triples for which a triple triple is generated?