Computing method searching 3D perfect Euler bricks (or Euler cuboids)
by Christian Boyer, April-May 2012

This system for 3D perfect Euler brick (a, b, c):

can be rewritten:

meaning that s has at least three different ways to be a sum of two squares. For any primitive brick, all prime factors of s are of the form 4k+1.

Here is a method searching 3D perfect Euler bricks, based on the factorization of s.


Construct a list of primes of the form 4k+1, and their unique ways to be sums of two squares a+b (a odd, and b even):
           5 = 1+2, 13 = 3+2, 17 = 1+4, 29 = 5+2, 37 = 1+6, 41 = 5+4, ...

Do a loop building s with various factors of primes of the form 4k+1, and on each s: