# Complicated Brain Buster!

Due to the growing population, a new High School was built. In this New highschool was 1000 lockers for the students and of course the lockers were numbered one through one thousand. During recess a school wide experiment/project was planned among the students and teachers. At the beginning of school the first student was to come in and open all the lockers. The second was to close all the even numbered locker. The third was to change all of the lockers that were multiples of three.(Change as in, closing the open locker and opening the closed locker.) The fourth will to do the same except to lockers with multiples of four and so on. After all 1000 students have entered the school. which lockers will be opened and why?

Sorry, but i don't have the answer to this.

Have fun!

Related General Discussion News on Phys.org
That's a good one...I think I've seen this problem posted somewhere else before, but I've just tried it:

All the locker numbers that are perfect square numbers will be left open.

The number of times a locker is "flipped" is the same as the number of unique factors it has, including 1 and itself. #1 has 1; 2 has 2, 1; 3 has 3, 1; 4 has 4, 2, 1; 5 has 5, 1; etc. If the lockers all start closed, then the ones left open will be those which have been flipped an odd number of times. Thus, locker numbers which have an odd number of unique factors will be left open in the end. In fact, all the numbers which are not perfect squares will have an even number of factors. So, the perfect squares will have an odd number of unique factors and lockers with these numbers will be left open.

This is by no means a proof...I worked it out by hand up to 18 and noticed what was going on, but I'd be interested in knowing how to prove the statements I just made :P

Last edited:
As gabee had said, the number of times a locker is flipped is the same as the number of unique factors it has, including 1 and itself.
So, consider the locker numbered N.
The prime factor decompositon of N give us N = a**x * b**y * c**z * ... , where a,b,c... are primes.
So, the total number of factors is (x+1)*(y+1)*(z+1)*..., which, of course is odd if and only if x,y,z,... are even numbers.
So N is a perfect square.

The ones the remain open are the perfect squares. Thus, $$[\sqrt{1000}]$$ is the answer.

...which lockers will be opened and why?
Thus, $$[\sqrt{1000}]$$ is the answer.
$$[\sqrt{1000}]$$ ?!?!
No, it is not the answer.

Gabee gave us the correct answer at the second post.

$$[\sqrt{1000}]$$ ?!?!
No, it is not the answer.

Gabee gave us the correct answer at the second post.
I am not acquainted with the notation Kummer used, but I think you know very well what he means is the real answer.

That notation is the greatest integer function, that is, the greatest integer which is less than the value sqrt(1000) wich would be 31 (since all the numbers 1 through 31 are perfect squares whose squares are less than 1000).

I am not acquainted with the notation Kummer used, but I think you know very well what he means is the real answer.
What I know very well is anyone can read the real answer (clearly written) at the second post.

That notation is the greatest integer function, that is, the greatest integer which is less than the value sqrt(1000) wich would be 31 (since all the numbers 1 through 31 are perfect squares whose squares are less than 1000).
31 is not the correct answer to the OP's question. "which lockers will be opened and why?"

Heh...good point.

I am not acquainted with the notation Kummer used, but I think you know very well what he means is the real answer.

Of course, everybody knows what I mean is the right answer, too:

$${\{((int)\sqrt{()}[1->1000])^2\}}$$

:rofl:

Last edited by a moderator:
Of course, everybody knows what I mean is the right answer, too:

$${\{((int)\sqrt{()}[1->1000])^2\}}$$

:rofl:
Not only are you being obnoxious towards Kummer, but I have never seen him give a wrong answer on these forums, meriting him the benefit of the doubt.

That notation is the greatest integer function, that is, the greatest integer which is less than the value sqrt(1000) wich would be 31 (since all the numbers 1 through 31 are perfect squares whose squares are less than 1000).
Are you sure you're not confusing this with the floor function?

Not only are you being obnoxious towards Kummer, but I have never seen him give a wrong answer on these forums, meriting him the benefit of the doubt.
I understand you are an ardent fan of Kummer, but ... "obnoxious towards Kummer"?! I don't see my post in this way.

My expression
$${\{((int)\sqrt{()}[1->1000])^2\}}$$
means "For each number from 1 to 1000, take the integer part of its square root, and then square this new integer. The obtained set is the answer."

Besides the joke, this is the answer, isn't it?

In my oppinion, my expression is more intelligible than the Kummer's one:
$$[\sqrt{1000}]$$

And BTW,
I am not acquainted with the notation Kummer used, but I think you know very well what he means is the real answer.
why do you think someone should know very well something you can't even understand?

Last edited:
I'm no fan of anyone, but I think it's unfair to attack Kummer's response of the sort. And oh, regarding the last thing you said, Kummer specified "perfect squares". The s in bold speaks for itself. I am of the opinion the way his response was received reflected some lack of maturity. Anyway, I don't this thread was made for us to develop that argument, better to just forget about it.

I am not acquainted with the notation Kittel Knight used, but I think you know very well what he means is the real answer.

Okay, now could we please stop bathing in uselessness?

Okay, now could we please stop bathing in uselessness?
Good idea. When it comes to uselessness, moist is wet enough.

Hi numeral junkies !!! the correct answer gotta be 31 as explained above by some eminent blogiezzz !!! reason elucidated :- suppose the second student. He enters and simply does not disturb the 1st locker, He only makes changes in 2nd and the multiples of second. Then the fourth comes and changes the 4th and 8th locker( which earlier the 2nd guy has changed. ok... so u see that the one whose squares are less than 1000, once closed/opened remains so till the end example 2nd locker/4th locker respectively. Reason, their is none coming to change its status. for example the 899th locker would be closed by the 899th student only and this status is maintained as no one else touches it. On the other hand 900th locker is operated and even number( neccessary) of times after the first student operates, till the end , hence ends up remaining open, confused.......???????????? try it out for 10 lockers on paper, u wud get the trick

Last edited:
To my best of understanding...correct answer should be "31 open lockers" and "969 closed lockers"...unless proven otherwise.