mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2019-02-22, 21:21   #67
uau
 
Jan 2017

79 Posts
Default

Quote:
Originally Posted by henryzz View Post
Only just noticed that all the 4,6 solutions at the end are wrong. 1899+1899 is not square.
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?
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.
uau is offline   Reply With Quote
Old 2019-03-05, 12:15   #68
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,743 Posts
Default

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.
henryzz is online now   Reply With Quote
Old 2019-03-05, 15:03   #69
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

2·3·631 Posts
Default

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...
Dr Sardonicus is offline   Reply With Quote
Old 2019-03-05, 15:50   #70
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,743 Posts
Default

I have discovered an overflow bug in my code. I think that the 3 and 30 solution might be optimistic.
henryzz is online now   Reply With Quote
Old 2019-03-05, 18:51   #71
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

2·3·631 Posts
Default

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.
Dr Sardonicus is offline   Reply With Quote
Old 2019-03-05, 19:54   #72
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

10110011011112 Posts
Default

I have fixed my bug and my best is now 3 and 16
henryzz is online now   Reply With Quote
Old 2019-03-06, 20:56   #73
uau
 
Jan 2017

79 Posts
Default

Quote:
Originally Posted by henryzz View Post
I have fixed my bug and my best is now 3 and 16
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]
uau is offline   Reply With Quote
Old 2019-03-31, 22:50   #74
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,743 Posts
Default

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 is online now   Reply With Quote
Old 2019-04-09, 13:34   #75
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

5,743 Posts
Default

Quote:
Originally Posted by henryzz View Post
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.
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.
henryzz is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
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

All times are UTC. The time now is 16:14.

Wed Nov 25 16:14:53 UTC 2020 up 76 days, 13:25, 3 users, load averages: 2.31, 1.91, 1.75

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.