Math quiz

@ShadeDream: I 'll post the answer and close this tomorrow night. But if you decide to take it on and need more time, just let me know :)
 
oh gosh as soon as a saw all the numbers i got a headache! Math makes me sick! In my last math class for college and i cant wait for it to be over!
 
I give up, I can't find the formula as I don't know how to. I managed to find the open lockers but I used excel to do this. When trying to figure out the formula I came across patterns which reminded me of something I did in high school/college but I can't remember what it was.
 
Too bad I have no idea what math is, never understood that thing...
 
One more person added to the winners list and it 's time to post the solution. Congratulations to all who participated, I hope you had a lot of fun :)

The key to the answer is the question "which persons are going to toggle a given locker?". The answer to this becomes obvious after a bit of trial, for example locker number 8 will be visited only by persons 1,2,4 and 8.

Only the persons with number being a factor of the locker 's number will visit and toggle a given locker! The only way for a locker to end up open is if an odd # of people visit the locker. (because they start closed and if it 's an even # they 'll end up closed again)

The only set of numbers who have an odd # of factors are square numbers (why? because one of the multiplication pairs is composed by the same number e.g. 3x3 -> 1 number).

So, the next question becomes, how many square numbers are there up to 20? That 's easy , you can count them. But how many are there in a billion? That 's also easy! Remember, a sqare number is x^2 (e.g. 16 is 4^2). Well, how many other square numbers exist up to that? Obviously 4 (1^2, 2^2, 3^2, and 4^2) :)

So, to find how many square numbers there are in 1 billion, we just take the square root of 1 billion, and round it down to the closest integer -> 31622. Indeed, 31622^2 = 999.950.884 while 31623^2 = 1.000.014.129 > 1 billion. So there are 31622 squares (and open lockers) in one billion :)
 
Last edited:
I was going to give this a go but having read through the comment posts and seeing that people are writing code to solve it I think I will give it a miss. Already starting to get a headache thinking about it.
 
I was going to give this a go but having read through the comment posts and seeing that people are writing code to solve it I think I will give it a miss. Already starting to get a headache thinking about it.

Read the end of page 1 then because I posted the solution there a few minutes ago :D
 
I thought there was a trick to do the 1 billion ones without using a calculator -_-
its about finding an integer... :/
 
I could have answered both, but I am feeling too lazy ATM (as usual) to do that! :)

I have asked the second problem on WF and DP. Let's see if they can answer that, or we write a ebook and sell it for $47 min. to them. :D


j/k
 
Back
Top