Subject: | |
From: | |
Reply To: | |
Date: | Thu, 9 Mar 2000 19:18:25 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Paul,
Whether a door is open or not will depend on the number of divisors it has.
For example, a prime-numbered door will be opened by student 1 and closed by
the student whose number matches the door--no one else can touch it. So you
need to locate numbers who have an odd number of divisors (including 1 and
itself).
Notice that divisors typically come in pairs. For example, 45 is divisible
by {1 and 45}, {3 and 15}, and {5 and 9}. The only time you get a divisor
by itself is when the number is its square. That is, 16 is divisible by
{1 and 16}, {2 and 8} and 4 by itself.
So the only lockers which don't get an even number of state changes (i.e.,
which remain open at the end) are those which are exact squares of some number.
HTH,
Ted
--
Ted Ashton ([log in to unmask]), Info Sys, Southern Adventist University
==========================================================
Gott wurfelt nicht.
-- Einstein, Albert (1879-1955)
|
|
|