The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Problem Posed by Fermat

Date: 05/04/2001 at 21:43:19
From: Paul
Subject: Number Theory (a problem posed by Fermat)

I recently read portions of Michael Mahoney's book, _The Mathematical 
Career of Pierre de Fermat_, for a paper I had to do.  I quote from 
page 307:

"In 1643, seeking to induce Brulart to join in the discussion of 
number theory being carried on with Frenicle, Fermat posed three 
problems to him: 1. to find a right triangle such that the hypotenuse 
is a square and the sum of the two perpendiculars, or indeed of all 
three sides, is also a square; 2. to find four right triangles having 
the same area; 3. to find a right triangle such that the area plus 
the square of the sum of the smaller sides is a square.  Two letters 
written by Fermat to Mersenne immediately after this challenge 
indicate that both Brulart and Frenicle viewed the problems and the 
man who proposed them with anger and diistrust.  They accused Fermat 
of having posed impossible problems.  Though Fermat admitted the 
extreme difficulty of the problems, he assured Mersenne, and through 
him his two correspondents, that the problems had solutions.  
Eventually he supplied them; those to the first two problems are also 
found in the _Observations on Diophantus_."

Mahoney, however, does not supply Fermat's solutions. I took it upon 
myself to attempt to find solutions to the three problems. I haven't 
looked at two or three yet, but number one is driving me crazy.

Let me restate the problem:

Find a right triangle such that the hypotenuse is a square and the 
sum of the two perpendiculars, or indeed of all three sides, is also 
a square.

Is Fermat saying that if the hypotenuse is a square, and the sum of 
the two perpendiculars is also a square, the sum of all three sides 
will also be a square? That doesn't seem right to me.

If (a,b,c) is a Pythagorean triple and c = k^2 and (a+b) = m^2, then 
(a+b+c) = k^2 + m^2, which doesn't have to be a perfect square, does 

So that's my first question. But that's not really what's driving me 
crazy.  I read with interest Dr. Rob's response here on generating 
Pythagorean triples:

  Formula for Pythagorean Triples   

After reading it, I wrote a maple script to generate Pythagorean 
triples.  Then if c was a perfect square, I tested to see whether 
either of (a+b) or (a+b+c) was a perfect square.  I have tested at 
least 30,000 Pythagorean triples (I've lost count) and have had no 
luck.  This problem has been consuming my life all week!  It won't go 

In my maple program, I have run a for loop with 'm' running from 1 to 
100, 'n' running from 1 to 50, and 'd' running from 1 to 50 (where m, 
n, and d are as described in the aforementioned response attributed 
to Dr. Rob).  None of these produces a Pythagorean triple that 
satisfies the necessary conditions.

I'd be happy to send a copy of my Maple program, but I don't see a 
way to attach files to these messages.  If you want to see the 
program and have a way for me to attach it to a message, I'll do that.

Date: 05/08/2001 at 13:28:56
From: Doctor Rob
Subject: Re: Number Theory (a problem posed by Fermat) 

Thanks for writing to Ask Dr. Math, Paul!

You didn't find the solution because the smallest one has a, b, and c
all with 13 decimal digits.

Let's look at Fermat's solution to the first problem.  We deal with
triangles whose sides are rational numbers, and drop the primitivity
condition.  Thus m and n can be rational, and d = 1 throughout.

Form the right triangle with rational parameters n = x and m = x+1.
Its sides are

   a = 2*x^2 + 2*x,
   b = 2*x + 1,
   c = 2*x^2 + 2*x + 1.

Now you want

       c = 2*x^2 + 2*x + 1 = k^2,
   a + b = 2*x^2 + 4*x + 1 = j^2,
                   2*x     = j^2 - k^2 = (j-k)*(j+k).


   j - k = 2, 
   j + k = x,
   j = x/2 + 1,
   k = x/2 - 1.


   2*x^2 + 2*x + 1 = k^2 = x^2/4 - x + 1,
   (7/4)*x^2 + 3*x = 0,
   x = 0 (extraneous root) or x = -12/7.

That means that the rational triangle is formed with parameters
-12/7, -5/7.  It has sides (119/49,120/49,169/49).  To make all
the sides integral, form an integer triangle with parameters m = 5
and n = 12.  That gives a triangle (-119,120,169).  This formally
satisfies the condition, but has no geometric meaning, because
a < 0.  This negative value led Fermat to repeat the process using
parameters x+5 and 12.  This triangle's sides are (x+5)^2+12^2,
(x+5)^2-12^2, and 24*(x+5).  Hence x^2+10*x+169 and x^2+34*x+1 are
to be rational squares, say A^2 and (B/13)^2.  Then

   B^2 - A^2 = 168*x^2 + 5736*x.

One solution of this is to take

   B - A = 14*x,
   B + A = 12*x + 2868/7,
   A = -x + 1434/7.


   (-x+1434/7)^2 = A^2 = x^2 + 10*x + 169,
   x = 2048075/20566.

The ratio of x+5 to 12 is that of m = 2150905 to n = 246792.  The
triangle formed from these parameters has the desired properties.

Other authors have pointed out that this problem is intimately
connected with finding x and y such that 2*x^4 - y^4 is a square
or the negative of a square.

This discussion is derived from L. E. Dickson, _History of the
Theory of Numbers_ (Washington, DC:  Carnegie Institution, 1919-1923), 
reprint (New York, NY:  Chelsea Publishing Co., 1992), vol. II, 
pp. 620-621 and 165.

- Doctor Rob, The Math Forum   
Associated Topics:
College Number Theory
High School Number Theory

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.