Prob of Month April 2000

The Mathematics Department
Presents
The Problem of the Month
October 2006
Can’t Make Heads nor Tails of It
The Problem:
Everything was fine until the elves showed up. The long table was neatly
laid out with 100 place markers. At each place was a bright, shiny new
penny, placed heads up. One dollar never looked so good! Then the 1st elf
arrived. He walked down the length of the table, blithely flipping each
penny so that they all faced tails up. Then came the second elf. He walked
down the table and flipped every other penny, starting with the second one.
Thus, the odd numbered pennies were all facing tails up while the even
numbered pennies were all facing heads up. The third elf flipped every third
penny starting with the penny in the third place. The fourth elf …. well, you
get the idea. Finally, the 100th elf walked down the table to the very last
penny and flipped it. Then the elves vanished, leaving chaos in their wake.
Was it really chaos? Was there a pattern? What was the status (heads up
or tails up) of the last 10 pennies numbered 91, 92, 93, …, 100? Better yet,
find a general rule that gives the state of the penny in position N, where N is
any number from 1 to 100. How many pennies were left tails up? In what
positions were they?
The Solution:
A penny is flipped by the kth elf if and only if k divides the number of the
position of the penny. Put another way, a penny gets flipped once for each
of its position’s factors. Thus, if a penny’s position has an even number of
factors, it ends up as it started, heads up. If a penny’s position has an odd
number of factors, then it will end up tails up. For example, 4 is divisible by
1, 2 and 4. It has three factors. Consequently, the penny in position 4 will
end up tails up. It is easy to see that all pennies in positions given by a
prime number will end up heads up. This is because every prime number
has exactly two factors, 1 and itself.
Now we can apply our general rule to the last 10 pennies:
Position N
Factors of N
# of Factors
Position
91
1,7,13,91
4
heads
92
1,2,4,23,46,92
6
heads
93
1,3,31,93
4
heads
94
1,2,47,99
4
heads
95
1,5,19,95
4
heads
96
1,2,3,4,6,8,12,16,24,32,48,96
12
heads
97
1,97 (97 is prime)
2
heads
98
1,2,7,14,49,98
6
heads
99
1,3,9,11,33,99
6
heads
100
1,2,4,5,10,20,25,50,100
9
tails
Wait a minute! Isn’t strange that all but one of the last ten pennies end up as
they started?
No, it’s not strange at all; it’s a theorem. Have a look at the factors of each
number, above. Notice how the first factor, which is always 1, and the last
factor, which is always the number itself, multiply to give the number, N.
This is true, too, of the second factor and the next to last factor. It is also
true for the third factor from each end of the list. And so on… The fact of
the matter is this: the factors of any whole number occur in pairs. If d is a
factor of N, then N/d is also a factor of N. And, obviously, they multiply together to give N. Thus, we expect to get an even number of factors almost
all the time. What are the exceptions? Look at the factors of 100, above.
All of the factors pair up, as before. But there is a middle term, namely 10.
It is paired with itself since 10 x 10 = 100.
Aha! I hear you cry. There will be an odd number of factors of N precisely
when N is a perfect square. All of the other numbers will have an even
number of factors.
Putting this all together, we see that all of the pennies will end up heads up,
just as they started, with the exception of the perfect squares: 1, 4, 9, 16, 25,
36, 49, 64, 81 and 100. Precisely the pennies in these ten positions will be
left tails up.
Now, if the elves were to return and apply precisely their same procedure all
over again, all of the pennies would be as they started since all of the nonsquares are left unchanged by this process and all of the perfect squares
would get flipped back to their original state.