Re: [math-fun] Locker puzzle
I slighted the kid. He waited several days before working on it. His father wrote: Hi Bill, Just wanted to add that when Gabe was explaining the answer to me, he said "I can't remember if Bill said that all the lockers were opened at the beginning or not. If they were, then it's the perfect squares, but if they weren't then it's everything BUT the perfect squares." Gabe then wrote: welllllllll I had heard of it before, but I can explain. first, think about that a locker is swi[t]ched every time one of its factors goes by. that means the numbers w/ an odd no. of factors will be open. and the numbers w/ odd numbers of factors are squares, and that gives us our answer. ------- So DanA was scooped! Gabe's mom wrote: Ok, after much prodding...it's from 'How to be a Math Genius', by Dr. Mike Goldsmith. See the problem and answer below. Note that solution doesn't have an explanation, Gabe said he figured that out by himself. ----- Problem: Prison break At the prison, 20 prisoners are locked in 20 cells. The 20 prison guards looking after them have a strange way of locking up. The first guard unlocks all the cells. The second guard then locks every second door (2, 4, 6, etc.). The third turns the key in every third door, locking it if it is unlocked and unlocking it if it is locked. The fourth guard turns the key in every fourth door, and so on until all 20 guards have left. Which cells remain open allowing the prisoners to escape? Can you spot a pattern in these numbers? Answer: Prison break Doors 1, 4, 9 and 16 remain open, so 4 prisoners escape. These are all square numbers. Knowing this pattern, you can quickly work out the answer for 50 guards and 50 prisoners, or even 100. ----------- The young Neil Bickford likewise had a huge math collection, and knew it by heart. Conjecture: Lame books are good for smart kids. I'm reminded of that photo of the very young Terry Tao reading C.D. Olds's Continued Fractions. Gabe only got 620 on the math SAT, and asked what "normal" 7 yr olds got. Stay tuned for his AMC10 results. --rwg On Tue, Feb 13, 2018 at 8:49 AM, Bill Gosper <billgosper@gmail.com> wrote:
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.
participants (1)
-
Bill Gosper