On 2018-02-04 06:31, Hans Havermann wrote:
Dan Asimov wrote Suppose there is a school with an infinity of lockers, numbered 1, 2, 3, ....
Initially all lockers are closed. Definition: A locker is "switched" if it is changed from shut to open, or vice versa. At 1/2 minute to noon, every 2nd locker 2, 4, 6, ... is switched. at 1/3 minute to noon, every 3rd locker 3, 6, 9, ... is switched. Or in general: For each positive integer n >= 2: * At 1/n of a minute to noon, every nth locker n, 2n, 3n, ... is switched. No other changes are made to the lockers. Question: ---------
Which lockers are open at noon?
Unfortunately, Dan failed to open all the lockers at 1 minute to noon,
The lockers that are open should be the ones where the number of divisors of their locker number less one (because we don't switch for divisibility by 1) is odd.
I think Dan should've opened 'em all at 1 minute to noon,
Equivalently, the lockers that are closed are the ones where the number of divisors of their locker number is odd. So, e,g., #1 never opens, and the answer is the non-squares, no? (A certain 7yr old missed this and told me "The square numbers!" without a word to his dumbfounded parents.) --rwg
DivisorSigma[0,Range[25]] {1,2,2,3,2,4,2,4,3,4,2,6,2,4,4,5,2,6,2,6,4,4,2,8,3}
Seemingly, an odd number of divisors happens for squares. This must be so because in non-squares, for every divisor greater than the square-root there is a complement smaller than the square-root. But in squares the square-root is its own complement.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (1)
-
Bill Gosper