![]() |
![]() |
#67 | ||
Jan 2017
2×43 Posts |
![]() Quote:
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:
|
||
![]() |
![]() |
![]() |
#68 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
5×19×61 Posts |
![]()
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. |
![]() |
![]() |
![]() |
#69 |
Feb 2017
Nowhere
3·7·199 Posts |
![]()
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... |
![]() |
![]() |
![]() |
#70 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
10110101000112 Posts |
![]()
I have discovered an overflow bug in my code. I think that the 3 and 30 solution might be optimistic.
|
![]() |
![]() |
![]() |
#71 |
Feb 2017
Nowhere
3·7·199 Posts |
![]()
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 differences 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 Mij = Ai + Bj, we see that taking the difference of row j and row i of M gives the constant difference Aj - Ai. (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. |
![]() |
![]() |
![]() |
#72 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
579510 Posts |
![]()
I have fixed my bug and my best is now 3 and 16
|
![]() |
![]() |
![]() |
#73 |
Jan 2017
2·43 Posts |
![]()
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] |
![]() |
![]() |
![]() |
#74 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
579510 Posts |
![]()
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. |
![]() |
![]() |
![]() |
#75 | |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
5·19·61 Posts |
![]() Quote:
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. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
2019 Coding Challenge | miroslavkures | Number Theory Discussion Group | 2 | 2018-12-27 08:59 |
January 2018 | Xyzzy | Puzzles | 0 | 2018-01-02 03:09 |
January 2017 | Xyzzy | Puzzles | 4 | 2017-02-22 21:34 |
January 2016 | R. Gerbicz | Puzzles | 17 | 2016-02-04 17:00 |
January 2015 | Xyzzy | Puzzles | 1 | 2015-02-02 17:17 |