How to solve this problem and others like it?
Alright, I think Steem might just be the perfect place to post a question like this given all the programmers and tech guys/gals and their complex algorithms.
I've been doing these math puzzles lately just for fun and to keep the mind sharp but I am legitimately stumped on this one. I've found a formula that works for 2/3 of the number sets but not all. It's usually the 4th number set that breaks it.
I'm more interested in the thought process....
I'm not interested in the answer, I'm more interested in the thought process on how to solve something like this. I usually just guess and check until a formula works but I would love to know how a mathematician would tackle this as I know the guess and check method is not ideal.
Well, it's probably not the intended answer, but I believe it is a valid one.
Let's call them a,b,c=d, then I first check what factors can be found in d.
They are (2,2), (2,2,2), (2,2,3), (2,2,2,2,2) for the first line to the last line resp. Now I notice that if you do the same for b you'll get (2), (2,2), (2,3), (2,2,2) which is fairly close already. For the first 3 equations you could write d=2b and for the 4th it is d=4b. So how can we separate the fourth series from the other 3? If we take b-a, we get 0, 1, 1 and 2, which is almost what I want except for the first line. This can be solved by taking the factorial since 0! = 1! = 1.
So if I take (b-a)! I get 1, 1, 1, 2, multiplying that by 2 gives 2, 2, 2, 4 which are the numbers that I need to multiply b with to get d. So our formula becomes 2b(b-a)!=d, which works for all 4 examples but doesn't use the value of c.
After some thinking of how to incorporate c in our formula, I came up with this:
Look at the differences between the numbers:
b-a gives 0, 1, 1 and 2 resp.
c-b gives 1, 1, 2 and 0 resp.
I want to get a sequence of 2, 2, 2, 4 so I can multiply with b to get d. The above series don't seem to help much unless I subtract 1 more, then I get:
b-a-1 gives -1, 0, 0 and 1 resp.
c-b-1 gives 0, 0, 1 and -1 resp.
By multiplying these I can single out the last equation:
(b-a-1)(c-b-1) gives 0, 0, 0, -1
subtracting from 1 gives
1 - (b-a-1)(c-b-1) gives 1, 1, 1, 2
this is half of what I want so I multiply by 2:
2(1 - (b-a-1)(c-b-1)) gives 2, 2, 2, 4
This can be multiplied by b to get d:
2b(1 - (b-a-1)(c-b-1)) gives 4, 8, 12, 32
So there is another solution. ;)