you will find the problem in project Euler.net.
Because the formula I used is - so I think - not obvious, here is its development:
b = blue disks
a = amount od blue and red disks
b/a * (b-1)/(a-1) = 1/2
b^2 - b = a^2- a/ 2
b^2 - b +(1/2)^2 = a^2 - a/2 + 1/4
(b-1/2)^2 = (2*(a^2 - a) + 1)/4
b = sqrt(2*(a^2 - a) + 1)/2 + 1/2
b = (sqrt(2(a^2 - a)+1)/2
It looks like that it could work. But to my disappointment the solution is not correct.
Can anybody help me?
greetings
Volker
Because the formula I used is - so I think - not obvious, here is its development:
b = blue disks
a = amount od blue and red disks
b/a * (b-1)/(a-1) = 1/2
b^2 - b = a^2- a/ 2
b^2 - b +(1/2)^2 = a^2 - a/2 + 1/4
(b-1/2)^2 = (2*(a^2 - a) + 1)/4
b = sqrt(2*(a^2 - a) + 1)/2 + 1/2
b = (sqrt(2(a^2 - a)+1)/2
It looks like that it could work. But to my disappointment the solution is not correct.
Can anybody help me?
greetings
Volker

Comment