SOLUTION: lockers in a row are numbered 1,2,3,...1000. all the lockers are closed until a person walks by and opens all the lockers 2,4,6...998,1000. Then another person walks by and changes

Algebra.Com
Question 671080: lockers in a row are numbered 1,2,3,...1000. all the lockers are closed until a person walks by and opens all the lockers 2,4,6...998,1000. Then another person walks by and changes the state of every third locker. changing the state meaning opening closed lockers and closing opened lockers but only on every third locker. then, another person walks up and changes the state of every fourth locker.which lockers are closed?
Answer by AnlytcPhil(1806)   (Show Source): You can put this solution on YOUR website!
lockers in a row are numbered 1,2,3,...1000. all the lockers are closed until a person walks by and opens all the lockers 2,4,6...998,1000. Then another person walks by and changes the state of every third locker. changing the state meaning opening closed lockers and closing opened lockers but only on every third locker. then, another person walks up and changes the state of every fourth locker.which lockers are closed?
To make the problem easier, let's pretend
that all the lockers start out open, and a
person walks by and closes them all. That
person has then closed, i.e., changed the
state of every locker that has a factor of
1, which is EVERY locker! 

Now we can begin our problem, since all the
lockers are now closed.  A (second) person
walks by and opens the lockers 2, 4, 6, ...,
998, 1000.  That person has then opened,
i.e., changed the state of, every locker
whose number has a factor of 2.

The next (3rd) person that walks by changes the
state of every locker that has a factor of
3.

etc., etc.

So in the end if a locker has an even number
of factors it will end up open and if it has 
an odd number of factors it will end up closed.

Now we need to decide which integers have an
even number of factors and which integers have 
an odd number of factors.

For every factor, p, of N which is less than
the square root on N, N/p is a factor of N
which is greater than the square root of N.
Also the vice-versa is true. That is, for
every factor q which is greater than the
square root of N, N/q is a factor of N which
is less than the square root on N.    

An example is, say  18.  The square root
of 18 is about 4.24.  1, 2, and 3 are the
factors of 18 which are less than 4.24 and
therefore 18/1 = 18, 18/2 = 9, and 18/3 = 6
are the factors greater than 4.24.  The three
that are less than the square root and the 
three that are greater than the square root
make 6 factors, an even number of factors.

There are always the same number of
factors greater than the square root of an
integer as there are factors less than the
square root of the integer.  So 18 has an
even number of factors, 3 less than its
square root and 3 greater than its square
root, so that makes 6 factors, an even
number of factors.

So the factors less than the square root
plus the factors greater than the square
root will always be an even number of
factors.

However in the case of a perfect square,
like 16, the square root of the number
itself will add one more factor to the even
number of factors above and below the square
root. 16 has two factors below its square
root, 1 and 2, and two factors above its
square root, 8 and 16.  However the square
root of 16 itself, which is 4, makes 16 have
an odd number, 5, of factors.   

So all perfect squares have an odd number of
factors and all non-perfect squares have an
even number of factors.

Therefore the lockers that will end up
closed are the lockers whose numbers are
perfect squares and all the others will be open.

Edwin

RELATED QUESTIONS

there were 1000 students and 1000 lockers. 1st opened all the lockers 2nd closed each... (answered by Alan3354,greenestamps)
A new high school has just been opened, with an enrollment of 1000 students. The school... (answered by acalgebra)
there are 1000 students in a college. there are also 1000 lockers which are all opened.... (answered by ikleyn)
there are 1000 lockers on a hall,#'d 1-1000. Student 1 opens all lockers, #2 closes 2,4,6 (answered by jim_thompson5910)
PART C LQCKRfRNLEM Imagine you are at a school that has lockers. There are 1,000... (answered by scott8148)
The locker problem Imagine a long row of numbered lockers, from 1 to 100 say. The... (answered by KMST)
I am trying to find a starting point to help my daughter with the following math problem... (answered by scott8148)
At Linear High School, there are n lockers all located along a very long hall numbered... (answered by jim_thompson5910)
Following recess, the 100 students at a school lined up for the following activity: The... (answered by jkdamm)