# 3rd Power Diophantine Generator

**URL:** <https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970>\
**Category:** Factual Questions\
**Created:** [September 7, 2010, 9:48pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970 "2010-09-07T21:48:27Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 9, 2010, 7:53pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/21 "2010-09-09T19:53:38Z")

</div>

Just for fun I wrote a little program in Mathematica to implement **Cal** ’s method so I could brute force the crap out of this.

It checks all triples (l, w, h) = (i, a, ( i^2)/(2a)) where i is even and a is odd.

It’s up to about i = 1,000,000 now with no luck. Of course I’m pretty I haven’t checked anything that hasn’t been previously checked by people who have spent more time on this problem than I have.

I’ll let it run for a while, but I don’t believe a solution exists so I’ll probably kill it sooner rather than later.

Code below. Mathematica is effin’ sweet.

```auto

CheckTrip[{a_, b_, c_}] := (Sqrt[a^2 + b^2] == Floor[Sqrt[a^2 + b^2]]) && 
			   (Sqrt[a^2 + c^2] == Floor[Sqrt[a^2 + c^2]]) && 
			   (Sqrt[c^2 + b^2] == Floor[Sqrt[c^2 + b^2]])

i = 2;
While[Not[Or @@ (CheckTrip /@ ({i, #, i^2/(2 #)} & /@ Select[Divisors[i^2/2], OddQ]))], If[Mod[i, 10000] == 0, Print*]; i = i + 2]

```

---

<div class="post-metadata">

**Author:** ![adhay](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@adhay](https://boards.straightdope.com/u/adhay)\
**Post date:** [September 9, 2010, 8:02pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/22 "2010-09-09T20:02:20Z")

</div>

> [@Lance\_Turbo](#):
>
> …
> 
> I’ll let it run for a while, but I don’t believe a solution exists so I’ll probably kill it sooner rather than later. …

Trust me on this and move on.

---

<div class="post-metadata">

**Author:** ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)\
**Post date:** [September 9, 2010, 8:12pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/23 "2010-09-09T20:12:19Z")

</div>

> [@](#):
>
> Just for fun I wrote a little program in Mathematica to implement Cal’s method so I could brute force the crap out of this.
> 
> It checks all triples (l, w, h) = (i, a, ( i^2)/(2a)) where i is even and a is odd.
> 
> It’s up to about i = 1,000,000 now with no luck.

??  
What do you mean “no luck”? You haven’t found any other quadruples?

There’s a easier way. In order for 2ab to be a square, there are two possibilities:  
1.) a = 2e^2 and b = f^2, so c = 2ef

or

2.) a = 2e and b = ef^2 so c = 2ef  
Just plug in values for e and f in the above and chug. The simplest case of 1, 2, 2 has e = 1 and f = 1 in the either case.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 9, 2010, 8:25pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/24 "2010-09-09T20:25:05Z")

</div>

I had no luck solving the perfect cuboid problem. I had plenty of luck finding pythagorean quads.

This program takes an even i and generates every triple (l, w, h) = (i, a, ( i^2)/(2a)) where a is odd. Thus l^2 = 2 w h, so we know the long diagonal of the rectangular solid is an integer. At this point we only have to check if the face diagonals are integers. If they are the program stops, otherwise i is incremented by 2 and the program marches on.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [September 9, 2010, 8:58pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/25 "2010-09-09T20:58:31Z")

</div>

> [@CalMeacham](#):
>
> > [@](#):
> >
> > The OP’s method generates all Pythagorean triples in “lowest terms”
> 
> AFAIK, that’s true. And it generates many of the multiples of the “lowest terms”, but not all of the multiples, as I’ve demonstrated myself. Although it generates all of the lowest Pythagorean triples i know of (at least in “lowest terms”), I must admit that I don’t know that it will generate _all_ of the triples in “lowest terms”.

It is well-known (and has been known, although it is not clear if it was proved, for 2500 years) that you get all primitive Pythagorean triples (no common divisor) if you take numbers u \> v \> 0 and of opposite parity and let x = 2uv, y = u^2 - v^2, z = u^2 + v^2. As far as non-primitive ones, well in order that (x,y,z) be generable, z = u^2 + v^2 would have to be the sum of two squares. That necessary condition might be sufficient. At any rate you can generate (6,8,10), but not (9,12,15).

Here is amusing variation. You can generate all primitive integer-sided triangles with a 60 degree angle by a slightly more complicated generating formula, but no integer-sided triangle can contain a 30 degree angle.

---

<div class="post-metadata">

**Author:** ![Der\_Trihs](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/der_trihs/32/233_2.png) [@Der\_Trihs](https://boards.straightdope.com/u/Der_Trihs)\
**Post date:** [September 9, 2010, 9:20pm UTC](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970/26 "2010-09-09T21:20:44Z")

</div>

> [@dzero](#):
>
> Sometimes you people just fuckin’ scare me.

Ha, when I saw the thread title I thought “Oh, great, has someone been sucked into believing some perpetual motion machine scam again?”

_“Can the 3rd Power Diophantine Generator solve our energy woes?”_ is what I was envisioning.

[Previous page](https://boards.straightdope.com/t/3rd-power-diophantine-generator/552970.md?page=1)
