mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Puzzles (https://www.mersenneforum.org/forumdisplay.php?f=18)

 uau 2019-02-22 21:21

[QUOTE=henryzz;509126]Only just noticed that all the 4,6 solutions at the end are wrong. 1899+1899 is not square.[/QUOTE]
They're just written in a different format. The linked-to page has an explanation.

A=[2988, 5052, 12108, 34812]; B=[2988, 4356, 5787, 11164, 17046, 23948]
That's the same solution as what's written earlier as
A=[0, 16594560, 137675520, 1202947200]; B=[8928144, 18974736, 33489369, 124634896, 290566116, 573506704]

[QUOTE]@uau What were your search limits for this puzzle? Did you search for 5,5 solutions?[/QUOTE]I checked everything with a difference of squares below 4e9, and a somewhat pruned subset for differences below 8e9. Those had no solutions larger than 4+6.

 henryzz 2019-03-05 12:15

I have changed my search strategy somewhat(not trying for an exhaustive search) and found a solution with 3 As(including 0) and 30 Bs.

One of the big things that helped was only looking at As divisible by primorials. I am finding more and more Bs as I increase the multiplier to larger primorials. I suspect that it might be possible to construct solutions of any size by increasing the primorial. I haven't written the code yet to check whether these would extend to nice solutions with 4 As. Current results look promising in that regard though.

 Dr Sardonicus 2019-03-05 15:03

At one point, I had hopes of producing formulaic solutions. And, for the case of two sets of two numbers each, it's actually pretty easy. With the 2x2 matrix of squares [a^2, b^2; c^2, c^2] you have the relation

a^2 - b^2 = c^2 - d^2, or a^2 + d^2 = c^2 + b^2.

OK, just use the usual formula for a product of two sums of two squares.

Unfortunately, I was unable to expand on this idea. It is possible that quaternions etc might be used to satisfy some of the conditions that crop up in certain cases, but I didn't pursue this.

I looked at single-variable polynomials, and did not see any promising lines of attack.

The sort of simultaneous conditions that crop up are curious. The simultaneous equality of several differences of two squares points to numbers with lots of factors. For this reason, using primorials would seem to increase the odds of success...

 henryzz 2019-03-05 15:50

I have discovered an overflow bug in my code. I think that the 3 and 30 solution might be optimistic.

 Dr Sardonicus 2019-03-05 18:51

Curiously, I completely failed to notice a similar identity to the sum-of-two-squares identity, and one more directly applicable to the problem, for the product of two [i]differences[/i] of two squares, namely

(a^2 - b^2)*(c^2 - d^2) = (a*c +/- b*d)^2 - (a*d +/- b*c)^2.

As with the sum-of-two-squares identity, the product of k factors gives 2^(k-1) formally different expressions of the product as a difference of two squares. Alas, the expressions involve terms of total degree k. There is also a "head-to-tail" property of the various conditions that arise in the problem, which I didn't see how to use efficiently. Taking the example from the solutions

A=[9, 28224, 419904, 3968064]; B=[0, 47952, 259072, 2442960]

and letting M[sub]ij[/sub] = A[sub]i[/sub] + B[sub]j[/sub], we see that taking the difference of row j and row i of M gives the constant difference A[sub]j[/sub] - A[sub]i[/sub]. (Similarly with differences of two columns)

Taking row 2 - row 1, row 3 - row 2, and row 4 - row 3 we find the conditions

168^2 - 3^2 = 276^2 - 219^2 = 536^2 - 509^2 = 1572^2 - 1536^2,

648^2 - 168^2 = 684^2 - 276^2 = 824^2 - 536^2 = 1692^2 - 1572^2, and

1992^2 - 648^2 = 2004^2 - 684^2 = 2056^2 - 824^2 = 2532^2 - 1692^2

where the "head" of each expression in one set of conditions becomes the "tail" of an expression in the next.

 henryzz 2019-03-05 19:54

I have fixed my bug and my best is now 3 and 16

 uau 2019-03-06 20:56

[QUOTE=henryzz;510195]I have fixed my bug and my best is now 3 and 16[/QUOTE]
I ran my program for size 3 for a couple of hours, it found 3+18:
[31788, 237588, 971412]
[31788, 35210, 68936, 80460, 172060, 202104, 320040, 398216, 485352, 802935, 1069110, 1166760, 1223576, 1759940, 2145640, 3024801, 4809410, 32998140]

 henryzz 2019-03-31 22:50

Realized it doesn't need to be primorials.

99% sure this is a correct 3+23:
A1: 0 A2: 2945209595328000 A3: 9277150506624000

Running out of space in a long which is a nuisance.

 henryzz 2019-04-09 13:34

[QUOTE=henryzz;512334]Realized it doesn't need to be primorials.

99% sure this is a correct 3+23:
A1: 0 A2: 2945209595328000 A3: 9277150506624000

Running out of space in a long which is a nuisance.[/QUOTE]

Another improvement:

3+25: A1: 0 A2: 11009*M A3: 17081*M M: 21542104468684800000

My big issue currently is filtering the list of multipliers for M. Currently running 1 to 20000. Was filtering by the number of Bs the As can have but I am not too convinced by this as smaller multipliers are often better and that biases towards larger.

All times are UTC. The time now is 07:11.