#mathematicalRecreation I don't know the answer to this yet, but it has been bugging me since I woke up for some reason:

Is it possible to fill out a 3x3 square of cells with unique integers, such that every row and column [and diagonal?] contains a Pythagorean triple?

That is, where the three numbers {n1,n2,n3} in any row/column, *in some order*, satisfy a^2 + b^2 = c^2?

It feels like it depends on integers participating in many triples... but big ones do, sometimes?

#nerdsnipe

And if that's not possible, what if we say it's a 4x4 square of unique integers, and any row/column must contain (at least one) unique Pythagorean triple. That relaxation feels like it'd surely make it doable, at some point....
@Vaguery its possible! here is one such square:
15 25 20
39 65 52
36 60 48
unfortunately i havent found any square whose diagonals are also pythagorean triples, even after checking every square whose numbers are below 100000

@unnick very nice. So you enumerated to get this one?

Trying to sketch a metaheuristic that makes some sense for finding bigger ones with some kind of multiobjective hand-wavey minimization.

@Vaguery yeah, i wrote a program that enumerates the values at the corners, and tries extending them the middle values. i uploaded the (unreadable) code to https://gist.github.com/kcinnu/80b2fabae9675067b5d94a57f457e423 if you want to look at it
pyth.zig

GitHub Gist: instantly share code, notes, and snippets.

Gist