4 x 4 Magic Square solutions

I did a bit of checking by modifying the code to output each solution as a single line of comma separated values. This allows the use of text utilities to compare the output.

The 1740 solution code has no duplicates, neither does the 880 solution code.
All solutions from the 880 solution code appear in the 1740 solution code.

Further modifying the 880 solutions code, by expanding the seq array to eight arrays representing all rotations/reflections, produces 1740 solutions with no duplicates. These 1740 solutions match the 1740 solutions of the original 1740 solution code. So it appears the 880 solution code does produce unique solutions, none of which are a reflection/rotation of another.
< edit > As @DaveX points out below, I should have written 7040, not 1740. Not sure what I was thinking.

1 Like