euler bricks: way to calculate them? I have heard about Euler bricks, and i have noticed that there are an strong textinfinite number of euler bricks(as for 4D bricks we are still pending even one!) in existence. I get there may be infinite bricks, but this leaves an issue: how does one go about calculating a euler brick?
Could someone actually use this formula to calculate a perfect euler brick that has been eluded for  possibly millennia? Thanks in advance.
 A: Among others, Euler and Saunderson devised ways to generate an infinitude of euler bricks, eg Saunderson starts with a pythagorean triple (u,v,w) and sets a=u|4v^2-w^2|, b=v|4u^2-w^2|, c=4uvw.
However these methods do not generate all (primitive) Euler bricks, so we cannot use them to prove the nonexistence of a perfect cube.
In principle all (primitive) euler bricks can be found like this:
A 'candidate euler brick' is constructed from two primitive pythagorean triples (k,l,m) and (r,s,t) having odd k and r. Set a=lcm(k,r) and scale the triples up by a factor (a/k) and (a/r) respectively, to define b=la/k and c=sa/r. Two of the three face diagonals are integers, because of the triples. If b^2+c^2 is a square, the third is integral as well and the candidate is an euler brick.
I tested over a billion pairs of triples, (all pairs of the 50765 primitive triples (m^2-n^2, 2mn, m^2+n^2) with coprime 1<= n < m <= 500), and found 1013 primitive euler bricks. (Of which 315 had an odd side < 10^6, improving a bit on M. Kraitchik, 1945)
A: Generating Euler Bricks is hard with just a formula, so I made a Python code to generate them for you. Of course, this will generate already known bricks, and will take a massive amount of time. For with each for loop, you have to cube the range and that is the number of sets it must test. Some improvement could be made, and I am working on that, but it is taking a little while because there aren't really any known conformities that a Euler Brick follows. Here is the code pasted below. You can change the number in the range part of the for loops. This will cause more bricks to be calculated. You can run this code in something like PyCharm, or an online compiler like RepL.it
import math
a = 1
b = 1
c = 1
for a in range(1, 800):
for b in range(1, 800):
for c in range(1, 800):
x = math.sqrt(a ** 2 + b ** 2)
y = math.sqrt((a ** 2) + (c ** 2))
z = math.sqrt((b ** 2) + (c ** 2))
if x == int(x):
if y == int(y):
if z == int(z):
values = [a, b, c]
print(values)
That code is fairly simple, but I think there could possibly be some improvement. Instead of testing to see if each number is an integer, you can instead test them at the same time and speed up the process probably saving around 300 ms per test. I don't know quite how to do this but I am working on it. You could also change the range values (the bolded text) so that you are only calculating past numbers that we don't know if they're Euler Bricks. So you could change those numbers to something like 10^13 so that it is something different. This will allow you to generate new Euler Bricks that haven't been discovered, although it will take longer to generate individual Euler Bricks. I would recommend running this and finding 1 Euler Brick then changing the range values, because the more numbers it compares, the laggier it will get. I am just now realizing that the code is not in line correctly so I'm not really sure what to do about that. I will instead also post a link to it on this thing. https://replit.com/@JacksonVliet/Euler-Brick#main.py
