English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

James school has 1000 students and 1000 lockers. The first student opens every locker. The second closes every second locker. The third studentreverses ( closes if opened, opens if closed )every third locker. The forth students reversesevery fourth locker... this continues until every student has opened or closed at least one locker. Which lockers are left open after all of this the process? PLEASE EXPLAIN AND I AM IN 7th GRADE THANK YOU VERY MUCH :)

2007-11-26 10:59:11 · 2 answers · asked by Q-Pac 1 in Science & Mathematics Mathematics

2 answers

The lockers left open are not primes, but rather squares. The only way a locker can be left open is if it has an odd number of distinct factors. If the locker's number has an even number of factors, then for every time it is opened by the student corresponding to one factor, it is closed by the student corresponding to a different factor. But if the locker's number has an odd number of factors, then there is an "extra" opening of the locker that is not reversed. Only square numbers have an odd number of factors, because factors normally occur in pairs, unless the factors matched with each other are the same number, meaning the product is square.

All of the prime-numbered lockers will end up closed. A prime number has itself and one as factors, for an even number of factors. Each of prime-numbered locker will be opened by the first student, and the only other time it will be touched is when the student whose number matches that locker closes it.

2007-11-28 10:21:22 · answer #1 · answered by DavidK93 7 · 0 0

Just the prime numbers are left.
Check out http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes

2007-11-26 19:02:25 · answer #2 · answered by _asv_ 3 · 0 0

fedest.com, questions and answers