![]() |
![]() |
#56 | |
Sep 2017
5616 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#57 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
3·1,931 Posts |
![]()
It seems to me that this problem should have a much easier solution than I have found. My code spends the majority of its time finding possible B2s and A3s(A1=0). I wish I could come up with an efficient way of finding all numbers of the form x^2-b1 and x^2-b2.
|
![]() |
![]() |
![]() |
#58 | ||
Mar 2018
3·43 Posts |
![]() Quote:
Quote:
Last fiddled with by DukeBG on 2019-02-05 at 13:05 |
||
![]() |
![]() |
![]() |
#59 | |
Sep 2017
2·43 Posts |
![]() Quote:
[0, 54432, 119392, 263872] & [324, 79524, 227529, 1258884] Last fiddled with by SmartMersenne on 2019-02-05 at 17:19 Reason: Typo in third number of the second set. Fixed |
|
![]() |
![]() |
![]() |
#60 |
Jan 2017
5616 Posts |
![]() |
![]() |
![]() |
![]() |
#61 | |
Jan 2017
8610 Posts |
![]() Quote:
If x2+D=y2, then D=y2-x2=(y-x)(y+x). If you generate all divisors k of D, then you can solve for possible values of x from (y-x)=k, (y+x)=D/k -> x = (D/k - k)/2. |
|
![]() |
![]() |
![]() |
#62 | ||
Mar 2018
3×43 Posts |
![]() Quote:
However I mistakenly ignored even D's. The (...)/2 part requires that the two divisors have the same evenness (oddity? translating math terms I'm used to into english is sometimes a pain), so 2 as a prime divisor cannot be in power 1. If present in D, it should be present in both sides of the "split" into two divisors. (My mistake was that I decided it shouldn't be present at all because the solutions with it on both sides could be simplified into a solution without it. Nevermind it, wrong conclusion) Quote:
Raises the question of how to normalize these solutions then... Although that doesn't help in any way in finding bigger sets. |
||
![]() |
![]() |
![]() |
#63 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
132418 Posts |
![]()
I was calculating a list of x^2-b1 storing it and then reusing the filtered list when looking for a b2.
The thing I hadn't thought about was using difference of squares trick. I need to think on this further. Using my current method I think can do an exhaustive search upto 1e9 in around 24 hours. |
![]() |
![]() |
![]() |
#64 |
Jan 2017
2×43 Posts |
![]()
Exhaustive search of what? You'll find all solutions that have what parameter under 1e9? All the numbers in both sets are below that?
Last fiddled with by uau on 2019-02-06 at 12:56 |
![]() |
![]() |
![]() |
#65 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
3·1,931 Posts |
![]() |
![]() |
![]() |
![]() |
#66 |
Just call me Henry
"David"
Sep 2007
Cambridge (GMT/BST)
132418 Posts |
![]()
Only just noticed that all the 4,6 solutions at the end are wrong. 1899+1899 is not square.
@uau What were your search limits for this puzzle? Did you search for 5,5 solutions? After pinching your difference of squares idea, I have just started a run where a1=0, b1 and a2 < 1e9 and everything else < 1e12 |
![]() |
![]() |
![]() |
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 |