You are viewing a single comment's thread from:
RE: Brainsteem #7 Prize Maths Puzzle [Win 2SBD+1SBD]
Yes, that's the reason for the 2nd random prize - not to freeze the problem just because of one correct answer!
And method, please. Thanks
Yes, that's the reason for the 2nd random prize - not to freeze the problem just because of one correct answer!
And method, please. Thanks
Alright so I didn't do this with a mathematical approach but rather a software engineering approach. First thing I did was created a list of the first 1000 prime numbers and threw them into a predefined array (list)
Since I had the array and I had then created a few rules that must be true. First of all, a = d - c and the reason I have it as that is a rearranged the d= a + c and I did that because I could rearrange another formula to get D by itself without the use of A. I then rearranged the 1+bc+d=bd to get bd-d = 1+bc which can be rearranged to d(b-1)=1+bc and finally becomes d=(1+bc)/(b-1)
By this point I am now only relying on 2 variables, B and C... while I could potentially solve with system of equations I instead decide to do some brute forcing with a computer but for that I need an equation to brute force. So I take the first equation a(a+b+c+d)=c(d-b) and I rearrange it to a(a+b+c+d)-c(d-b)=0 and proceeded to brute force. Now the brute force worked by setting B to equal a prime number in the list then set c to equal the first prime and cycle through every single prime number and print each set of B and C that made the equation that is equal to 0 return true. Then those numbers were sent to a second layer to determine that both A and D were prime numbers. If they were it would then print out the product of the 4 numbers.
This output a single answer of 2002 where A=2, B=7, C=11, D=13
I know this probably isn't the method you had hoped for but its how I think.
If you want me source code I will give it to you, anyways I apologize that I corrupted your math challenge with programming.