0020: Article 10 (Mengoli's Six-Square Problem, or MSP)


Mengoli’s Six-Square Problem and Face Cuboids

(Of Squares, Triangles, and Cuboids)


By Tito Piezas III



0. Introduction

I. Three Squares

II. Two Triangles

III. One Cuboid

IV. Some Formulas



0. Introduction


In 1644, at the tender age of 18, the Italian mathematician Pietro Mengoli (1626-1686) proposed what would later be known as the Basel Problem.  He asked for the exact sum of,


Σ 1/n2 = 1/12 + 1/22 + 1/32 + 1/42 + …


as n goes to infinity.  Nearly a century later, this was solved by Euler who found that, 


Σ 1/n2 = π2/6 = 1.644934…


This would not be the only instance that two lives, separated by a century, would intersect.  Mengoli also asked for three positive integers {x,y,z} such that the sum and difference of any two are all squares,


{x+y, y+z, x+z} = {a12, b12, c12}

{x-y,  y-z,  x-z}  = {a22, b22, c22}


This is known as Mengoli’s Six-Square Problem, or MSP for short. He was able to find a rather large solution, but Euler would find a smaller one which, in fact, turns out to be the smallest. The three smallest primitive solns {x,y,z} with all terms less than 106 are,


1.  {434657, 420968, 150568}    (Euler’s)

2.  {496625, 474993, 428175}

3.  {733025, 488000, 418304}


with the first one yielding, 


x+y = 9252

x-y  = 1172

y+z = 7562

y-z  = 5202

x+z = 7652

x-z  = 5332


Note also that,


(925*117)2 + (756*520)2 = (765*533)2


More generally, given the tautology,


(x2-y2) + (y2-z2) = (x2-z2)


since it is required that {x2-y2, y2-z2, x2-z2} = {(a1a2)2, (b1b2)2, (c1c2)2}, then MSP implies the special Pythagorean triple,


(a1a2)2 + (b1b2)2 = (c1c2)2


hence {a1a2, b1b2, c1c2} are the three sides of a right triangle, as the numerical example above clearly shows.  Courtesy of Randall Rathbun, Jarek Wroblewski, and Raymond Manzoni who independently did an exhaustive search on face cuboids, we now know Euler’s solution is the smallest.  Before going into the proof, it should be pointed out that MSP can be transformed into three related problems:


I.      Three squares {u2, v2, w2} such that the difference of any two is a square

II.      Two right triangles such that the products of their legs, or hypotenuses and legs, is a square, or abcd(a2±b2)(c2±d2) = t2.

III.      One face cuboid with sides {a,b,c} wherein {a2+b2, a2+c2, a2+b2+c2} are all squares.



I.  Three Squares


T. Leybourn showed that MSP can be reduced to finding three squares {u2, v2, w2} such that the difference of any two is a square. 


Proof:  Set the first half of MSP as,


{x+y, x+z, y+z} = {u2, v2, w2}


Solve for {x,y,z} to get,


{2x, 2y, 2z} = {u2+v2-w2, u2-v2+w2, -u2+v2+w2}


Substitute these into the other half of MSP, or{x-y, y-z, x-z}, and they transform into the expressions which must be made squares, specifically,


u2-v2 = s12      (eq.1)

u2-w2 = s22      (eq.2)

v2-w2 = s32      (eq.3)


(End proof.)


The system eq.1,2,3 can be partially reduced to the problem,


abcd(a2±b2)(c2±d2) = t2       (eq.0)


also to be discussed (with solutions) in the next section.  Let, {u,v,w} = {(p2+q2)(r2-s2),  (p2-q2)(r2+s2),  (p2-q2)(r2-s2)}.  This makes eq.2 and 3 as squares while eq.1 becomes,


4(p2r2-q2s2)(q2r2-p2s2) = (pr+qs)(pr-qs)(qr+ps)(qr-ps) = s12      (eq.1b)


Eq.1b can be transformed into the form of eq.0 in two ways:


1. Let {p,q,r,s} = {ac-bd, ad+bc, ac+bd, ad-bc},  to get 16 abcd(a2-b2)(c2-d2) (a2+b2)2(c2+d2)2 = t2


2. Let {p,q,r,s} = {ac+bd, ad+bc, ac-bd, ad-bc},  to get 16 abcd(a2+b2)(c2+d2) (a2-b2)2(c2-d2)2  = t2


A direct soln to eq.1b was given by W. Lenhart using (after scaling variables) what is essentially a Pythagorean triple.  Let x2+9y2 = z2.  Define {p,q,r,s} = {4y, z, 4xy, x2+5y2}.  Then,


4(p2r2-q2s2)(q2r2-p2s2) = 16y2(x2-3y2)2(x2+25y2)2



II. Two triangles


Part 1.  The equation discussed previously,


abcd(a2±b2)(c2±d2) = t2       (eq.0)


can also be interpreted in terms of a right triangle.  Based on the well-known formula for Pythagorean triples, then eq.0 is the problem of finding two right triangles such that either,


1) ( case): the product of their legs is a square

2) (+ case): or the product of two legs and the two hypotenuses is a square


Note that solving eq.0 for either sign generates a third Pythagorean triple since,


4abcd(a2-b2)(c2-d2)  =  (ac-bd)2(ad+bc)2 - (ac+bd)2(ad-bc)2 = t12      (eq.0a)

4abcd(a2+b2)(c2+d2) = (ac+bd)2(ad+bc)2 - (ac-bd)2(ad-bc)2 = t22      (eq.0b)


Two small solns to eq.0 are,


{a,b,c,d} = {(u2+4v2)/2, u2-2v2, 6v2, u2-2v2}

{a,b,c,d} = {u+v,  u-v,  (u2+v2)2,  4uv(u2-v2)}


for arbitrary {u,v}.


Part 2.  MSP has two broad solutions.  Recall the problem is to find {x,y,z} such that,


{x+y, y+z, x+z} = {a12, b12, c12}

{x-y,  y-z,  x-z}  = {a22, b22, c22}


[1]. Mengoli:  Let pqrs and (p2+q2)(r2+s2) both be squares.  Then, {2x, 2y, 2z} = {a2+b2,  c2+d2,  a2-b2}, where {a,b,c,d} = {pr+qs, ps+qr, pr-qs, ps-qr}.

[2]. Euler:      Let pqrs and  (p2-q2)(r2-s2) both be squares.   Then, {2x, 2y, 2z} = {a2+b2,  a2-b2,  c2-d2},  where {a,b,c,d} = {pr+qs, ps-qr, pr-qs, ps+qr}.


Notice the subtle sign differences between the two and how the variables are to be defined.  The two are related such that a soln to [1] automatically leads to one for [2], and vice-versa, as will be shown in Note 3.


Note 1:  Mengoli gave two particular solns for [1] but a smaller one is {p,q,r,s} = {12, 35, 21, 20} which, after scaling, yields {x,y,z} = {3713858, 891458, 88642}.  This soln has the form,


{p,q,r,s} = {mu, nv, mv, nu}


which takes care of the first condition since it becomes pqrs = (mnuv)2 and reduces the second to finding {m,n,u,v} such that,


(m2u2+n2v2)(n2u2+m2v2) = y2


This can be treated as an elliptic curve in either {u,v}, hence there are an infinite number of solns.


Note 2:  Euler gave {p,q,r,s} = {4, 9, 49, 81} for [2] which yields the smallest solution to MSP as {x,y,z} = {434657, 420968, 150568}.  This obviously has the form,


{p,q,r,s} = {t2, u2, v2, w2}


which takes care of the first condition and modifies the second to,


(t4-u4)(v4-w4) = y2


Likewise, this can also be treated as an elliptic curve.  In fact, there are many small solns to this where GCD(t,u) = GCD(v,w) = 1 other than Euler’s with a few others being {t,u,v,w} = {1, 17, 3, 7}, or {2, 3, 2, 11}, and so on.


Note 3:  One can use the formula for Pythagorean triples to prove that a soln to [1] (Mengoli's) leads to one for [2] (Euler's), and vice versa.  Let,


{p,q,r,s} = {e2-f2, 2ef, g2-h2, 2gh}


This satisfies the 2nd condition of [1], and transforms the first into finding,


4efgh(e2-f2)(g2-h2) = y12


which can be fulfilled by [2].  This is also eq.0 and two simple solns were given in the previous section.  For a particular example, one can use Euler’s {e,f,g,h} = {4, 9, 49, 81}.  Similarly, let,


{p,q,r,s} = {e2+f2, 2ef, g2+h2, 2gh}


This satisfies the 2nd condition of [2], and transforms the first into,


4efgh(e2+f2)(g2+h2) = y22


which is now fulfilled by [1].  For example, with {e,f,g,h} = {12, 35, 21, 20}. 



III. One Face Cuboid


Following Randall Rathbun, there are 4 kinds of cuboids with sides {a,b,c} depending on which dimension is irrational.  These are: 1) Euler brick, 2) edge cuboid, and 3) face cuboid wherein the space diagonal, an edge, or a face diagonal is irrational, respectively.  The last is 4) perfect cuboid where no dimension is irrational.  It is yet unknown if it does or doesn’t exist. 


Expressed in terms of 3-dimensional Cartesian coordinates,



Equivalently, a perfect cuboid is then a point {x,y,z} such that,


x2+y2 = t12

x2+z2 = t22

y2+z2 = t32

x2+y2+z2 = t42


is defined by seven positive integers {x, y, z, t1, t2, t3, t4}.  

It can be proven that the Mengoli's Six-Square Problem (MSP) is equivalent to finding a rational “face cuboid” {a,b,c} and {b,c} with the same parity such that,


a2+b2 = s12          (eq.1)

a2+c2 = s22          (eq.2)

a2+b2+c2 = s32     (eq.3)


call this system as M.  Proof:  Define MSP’s {x,y,z} as,


{2x, 2y, 2z} = {2a2+b2+c2, b2+c2, -b2+c2}       (Def. 1)


One can easily solve for {a,b,c} as,


{a2, b2, c2} = {x-y, y-z, y+z}


Substituting these values into a face cuboid’s definition {a2+b2, a2+c2, a2+b2+c2} will yield {x-z, x+z, x+y}.  Thus, if the six expressions {x-y, y-z, y+z, x-z, x+z, x+y} are all squares (which is precisely the Six-Square Problem), then one gets integer {a,b,c} which gives a rational face cuboid.  Conversely, given a rational face cuboid {a,b,c}, one can easily find {x,y,z} using Def.1 given above. (End proof.)


Thus, the problem of determining if Euler’s soln is the smallest is reduced to a finite calculation of much smaller magnitude, namely, to find all primitive face cuboids with sides {a,b,c} < 1000.  Rathbun, Wroblewski, and Manzoni independently did an exhaustive search and found,


1. {104, 153, 672}

2. {117, 520, 756}   (Euler’s)

3. {448, 264, 975}

4. {495, 264, 952}

5. {840, 448, 495}


While {104, 153, 672} is a smaller face cuboid, its {b,c} do not have the same parity and hence the sum ±b2+c2 is not evenly divisible by 2.  The second has {b,c} with the same parity and, after dividing by 2, yields Euler's {x,y,z} as the smallest for Mengoli’s Six-Square Problem. 


To recall, a face cuboid {a,b,c} has {a2+b2, a2+c2, a2+b2+c2} as all squares. A remarkable triplet found by Wroblewski share the common side “a”,


{1680, 1925, 2052}

{1680, 819, 3740}

{1680, 3404, 4653}


hence is the common leg of six different Pythagorean triples and three Pythagorean quadruples.  This is the only one with a < 105, though using an identity (in the Formulas section), and the eqn p4+q4 = r4+s4, it can be shown that the value “2pqrs” always appears in a triplet of face cuboids, though not necessarily the side “a”.


(Update, 2/9/11):  In an email, R. Rathbun provided the complete list of 24 face cuboids with gcd(a,b,c) = 1 sharing the common side “a” less than ten billion (1010), with the next four as,


{683760, 132349,  3581820}   

{683760, 614180,  1893771} 

{683760, 1522180, 4036851} 

{683760, 726869,  7505820} 


{4084080, 1487772,  5110525}     

{4084080, 2024207,  5975424} 

{4084080, 4776541,  10668060} 

{4084080, 5619537,  6145984} 


{5525520, 2042975,  10043712}

{5525520, 4055360,  6844761}

{5525520, 6616640,  20282031}

{5525520, 9746825,  14511168} 


{6126120, 3150048,   9088625}    

{6126120, 13316839, 14048160} 

{6126120, 7274625,  24095008} 


and a quintuplet (#15 of the 24),


{232792560, 55306628,  117515475}

{232792560, 71608131,  135412420}

{232792560, 135423925, 447886692}

{232792560, 153939420, 414785371}

{232792560, 180609955, 1219785588}


which is the only one known so far.  With more data, an interesting trend can be observed,


1680 = 24·3·5·7

683760 = 24·3·5·7·11·37

4084080 = 24·3·5·7·11·13·17

5525520 = 24·3·5·7·11·13·23

6126120 = 23·32·5·7·11·13·17

232792560 = 24·32·5·7·11·13·17·19


Why are they so highly factorable?  This can be seen for all the 24 face cuboid n-tuplets given by Rathbun. (End update.)



IV. Formulas 
There are interesting formulas by various authors that use any of the simple eqns,


A) x2+y2 = z2,

B) x2+3y2 = z2,

C) p4+q4 = r4+s4


to find a face cuboid {a,b,c}.  However, the formulas are not in their original form as this author used Mathematica to find a more aesthetic presentation that reduced the degree of the polynomials, and their connections to the simple conditional equations (1), (2), (3).


A. x2+y2 = z2


1. M. Rolle, Lowry:  Define {a,b,c} = {y(3x4-4y4),  x(4y2z2-x4),  4xyz(y2+z2)}.  Then, 


a2+b2 = (x4+4y4)2z2

a2+c2 = (5x4+8x2y2+4y4)2y2

a2+b2+c2 = (x4+8x2y2+4y4)2z2


For ex, let {x,y,z} = {3,4,5}, then {a,b,c} = {3124, 4557, 9840}.


2. W. Lenhart:  Define the scaled Pythagorean triple x2+(3y)2 = z2. Then,


{a,b,c} = {8xy(x2-7y2)(x2+5y2),  8y2(x2-3y2)(x2+25y2),  (x2-7y2)(x4-6x2y2+25y4)}


For ex, let {x,y,z} = {4,1,5}, then {a,b,c} = {6048, 4264, 1665}.



B. x2+3y2 = z2


To recall, the smallest primitive face cuboids {a,b,c} < 1000 as calculated by Rathbun et al are,


{104, 153, 672}

{117, 520, 756}

{495, 264, 952}

{448, 264, 975}

{840, 448, 495}


It can be noticed the last three is a triplet that share common terms. It turns out this can be explained by three identities that, interestingly enough, depend on the simple equation,


x2+3y2 = z2       (eq.1)


1. Euler.  Define {a,b,c} = {(x2-y2)(y2-z2)2xy(y2-z2),  2yz(x2+y2)}.  Then,


a2+b2 = ((x2+y2)(y2-z2))2

a2+c2 = (4y4+x2z2)2

a2+b2+c2 = ((x2+y2)(y2+z2))2


2. Piezas.  Define {a,b,c} = {(4xy2z, 2xy(y2-z2), 4y4-x2z2}.  Then,


a2+b2 = (2xy(y2+z2))2

a2+c2 = (4y4+x2z2)2

a2+b2+c2 = ((x2+y2)(y2+z2))2


3. Piezas.  Define {a,b,c} = {(2yz(x2-y2), 4xy2z, (x2-y2)(y2-z2)}.  Then,


a2+b2 = (2yz(x2+y2))2

a2+c2 = (4y4-x2z2)2

a2+b2+c2 = (4y4+x2z2)2


Thus there is a triplet of face cuboids that, two at a time, share a common addend, with all three having a common sum (in red).  Using the smallest soln of eq.1 as {x,y,z} = {1,4,7}, this yields the triplet (according to color).  Since eq.1 can be given the parametrization {x,y,z} = {u2-3v2, 2uv, u2+3v2}, then there is an infinite number of such triplet face cuboids.  (Note:  Ultimately, however, a bivariate quadratic solution can be expressed in terms of Pythagorean triples {a,b,c}.  For example, it is the case that (2a-c)2 + 3(b)2 = (a-2c)2, though the resulting expressions in {a,b,c} are messier compared to the ones in {x,y,z}.)



C. p4+q4 = r4+s4


1.  Let {a,b,c} = {p2q2-r2s2,  p4-r42pqrs}.  Then,


a2+b2 = (p2s2-q2r2)2

a2+c2 = (p2q2+r2s2)2

a2+b2+c2 = (p2s2+q2r2)2


2.  Let {a,b,c} = {p2q2-r2s2,  q4-r42pqrs}.  Then,


a2+b2 = (q2s2-p2r2)2

a2+c2 = (p2q2+r2s2)2

a2+b2+c2 = (q2s2+p2r2)2


3. Let {a,b,c} = {2pqrs,  p2s2-q2r2,  p2r2-q2s2}.  Then,


a2+b2 = (p2s2+q2r2)2

a2+c2 = (p2r2+q2s2)2

a2+b2+c2 = (p4+q4)(r4+s4)


The first two are by Piezas, while the third is by R. Beauregard and E. Suryanarayan.  Given p4+q4 = r4+s4, this then yields a triplet of face cuboids that share the common term, 2pqrs, while the first two share an additional term.  (For that pair, p and q just swap places since it does not affect the conditional equation.)  An example is given by {p,q,r,s} = {59, 158, 133, 134}.  Since there are an infinite number of identities for the conditional eqn (III), then so is there for face cuboids. 



Any other simple formula for a) three squares, b) two triangles, c) one face cuboid and, by extension, to Mengoli’s Six-Square Problem?




-- END -- 



© Dec 2010

Tito Piezas III

You can email author at tpiezas@gmail.com



Previous Page        Next Page