20190222, 21:21  #67  
Jan 2017
2^{3}×3×5 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:


20190305, 12:15  #68 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
61×97 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. 
20190305, 15:03  #69 
Feb 2017
Nowhere
2×47×53 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 singlevariable 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... 
20190305, 15:50  #70 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
1011100011101_{2} Posts 
I have discovered an overflow bug in my code. I think that the 3 and 30 solution might be optimistic.

20190305, 18:51  #71 
Feb 2017
Nowhere
11566_{8} Posts 
Curiously, I completely failed to notice a similar identity to the sumoftwosquares 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 sumoftwosquares identity, the product of k factors gives 2^(k1) 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 "headtotail" 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_{ij} = A_{i} + B_{j}, we see that taking the difference of row j and row i of M gives the constant difference A_{j}  A_{i}. (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. 
20190305, 19:54  #72 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
61·97 Posts 
I have fixed my bug and my best is now 3 and 16

20190306, 20:56  #73 
Jan 2017
2^{3}×3×5 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] 
20190331, 22:50  #74 
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
61·97 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. 
20190409, 13:34  #75  
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
61·97 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  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
2019 Coding Challenge  miroslavkures  Number Theory Discussion Group  2  20181227 08:59 
January 2018  Xyzzy  Puzzles  0  20180102 03:09 
January 2017  Xyzzy  Puzzles  4  20170222 21:34 
January 2016  R. Gerbicz  Puzzles  17  20160204 17:00 
January 2015  Xyzzy  Puzzles  1  20150202 17:17 