FAQ 
Calendar 



#1




Games Magazine Wild Cards numbers game
The January 2020 edition of Games magazine had a Wild Cards puzzle that I couldn't solve, and the solution they gave doesn't provide the steps taken to arrive at the answer. There has to be a better way than trial and error.
Quote:
a^{2}  b^{2} = ab ± 1 (a + b)(a  b) = ab ± 1 (a  b) = (ab ± 1) / (a + b) a  b is a threedigit perfect square, listed here: 10^{2} to 31^{2} I ruled out the top three, since the difference between two three digit numbers can't be more than 800. So, we're left with 10^{2} to 28^{2}, 19 possibilities for a  b. If a or b is prime, that leaves 145 possibilities for either, listed here. At this point, I couldn't figure out any way to simplify or narrow down the possibilities. Going forward, I could only see using trial and error, and there's way too many permutations to slog through. And so Doper geniuses, I turn to you. What's the proper way to determine the solution? Here it is in spoiler tags, in case this stumps you too. SPOILER:

#2




Probably not what you want, but I just wrote a quick 15line Perl script to search all 900*900 possibilities. Took me about 2 minutes.
Nitpick: there's a typo in one of the numbers in the first line of your spoiler. 
#3




Quote:
The first line of the spoiler should be 233, not 236. Thanks for spotting that. 
#4




OK, start from the first equation, a^2  b^2 = ab ± 1. Since a and b are both threedigit numbers, ab is going to be five to seven digits, meaning that that ±1 is almost irrelevant. So to a very good approximation, a^2  ab + b^2 = 0. Defining x == a/b, this means that x^2  x  1 ~= 0, or x ~= (1+sqrt(5))/2 ~= 1.61803 (incidentally, the Golden Ratio, phi). In other words, a ~= 1.61803 * b, or ab ~= 0.61803*b is a perfect square, or b is a threedigit perfect square times 1.61803 . That only leaves us nine numbers to check, 100 to 324 (any higher square would leave a and/or b with four digits).
Just computing the b values corresponding to those perfect squares, I notice very quickly that phi*144 is very, very close to an integer. So let's start there. phi*144 = 232.99632, so call it 233. And 233*phi = 377.001919, also really close to an integer. So it looks really likely that our numbers will be 233 and 377. 377^2  233^2 = 142129  54289 = 87840, and 233*377 = 87841. Looks like we've got it. 


#5




Quote:
Also, if you're defining x == a/b, wouldn't the the result be b^{2}x^{2}  ab  a^{2}/x^{2} ~= 0? How did you get x^{2}  x 1 ~= 0? Moreover, how did you leap to x ~= (1+sqrt(5))/2? 
#6




Moved to the Game Room.
Colibri General Questions Moderator 
#7




The first was a typo in the post, that was not reflected in my actual calculations: It should say a^2  ab  b^2 = 0. The same typo did not show up in the x equation.
The second came from replacing every instance of a with x*b (and leaving the instances of b alone), and then factoring out all of the b^2 pieces. And the third was the Quadratic Formula. There are actually two solutions, but the other solution corresponded to calling a the smaller number and b the larger number, which is really no different. 
#8




I dunno if this is helpful, but you can rule out any pair in which both numbers are even. The squares of an even number will always be even, the product of two even numbers will always be even, and the difference between the squares of two even numbers will always be even. So you can't have a2  b2 = ab ± 1, since that would lead to one result or the other being odd.
If one number's odd and the other is even, their product will be even, and the difference between the squares will be odd, so that can work. And if both are odd, then the product will be odd, and the difference between the squares will be even, so that can work. But no pairs of even numbers would work. Edit: The hint tells you one of the numbers is prime, which means all that work is superfluous: that means one of the threedigit numbers must be odd. D'oh! Last edited by Left Hand of Dorkness; 11172019 at 10:59 PM. 
#9




The solution given in the OP does explain where it came from: it says the 2nd relation applies to consecutive Fibonacci numbers (this follows from the Cassini identity). The difference of these is the Fibonacci number that comes before them, and it is required to be a square. The only square Fibonacci numbers are 0, 1, and 144. Only 144 is 3 digits, and b and a must be the next two Fibonacci numbers: 233 and 377.
Chronos' approach is headed in the direction of Fibonacci numbers too, since ratio of the two values is very close to the golden ratio. 


#10




Wait, what? 999100=899.
__________________
Providing useless posts since 1999! 
#11




Another way to solve this without knowing the Cassini Identity: Let c^{2}=ab. Eliminate a from the two equations and solve for b, giving
b=(c^{2}±sqrt(5c^{4}±4)/2 For b to be integer, 5c^{4}±4 must be a perfect square. Values of c meeting this can be found using the solution to Pell's equation, but it easier to just make a spreadsheet. Put "10" (representing c) in Column 1, sqrt(5c^{4}4) in Column 2, and sqrt(5c^{4}+4) in Column 3. Drag the three cells down until Column 1 contains 31 (to cover all cases with c having 3 digits). It is immediately clear which value in Column 2 or 3 is the only integer: c=12, and the radical is 322. Plug into the expression for b and add c^{2}=144 to get a. The ± results in two solutions: a=55 and b=89 (which is rejected because they are not 3 digits) a=377 and b=233. 
Reply 
Thread Tools  
Display Modes  

