### Varsity Math, Week 5

**It’s Week Five**, and you’ve just about made it through the first full cycle of the Varsity Math training regimen. Keep going — the big conclusion of the relay is today! Plus, there’s a bonus problem at the end, for those among you thinking of going pro.

**Laborious Lockup | Varsity**

A row of lockers numbered consecutively from 2 up stands open in the hallway before you. You are going to make a number of runs down the hallway. In each run, you proceed to the first open locker (numbered *N*), close and lock it, and then flip the state of every *N*th locker thereafter (without locking any of them). Thus in the first run, you close and lock number 2, and then close 4, 6, 8 and so on (without locking them). In the second run, you close and lock number 3, and then open 6, close 9, open 12, close 15 and so on (again, without locking 9 or 15 or any of the others). In the third run, you leave 4 alone since it’s closed, and proceed to 5 which is open. You close and lock 5, and then flip the state of 10, 15, 20 and so on. You keep making runs as long as there are any lockers open; when you are done, some of the lockers are locked and others are not.

* If there were 847 lockers in the hall, what’s the highest-numbered locker that’s locked when you are done?*

**Prime Event | Varsity Relay**

Anna and Basil play the following game: Anna starts with any positive whole number of her choice. Then Basil and Anna take turns subtracting any prime number less than or equal to the number generated so far, producing a new number to carry on with at each turn. Whoever produces either “0” or “1” (after his or her subtraction) wins. Assume that Anna and Basil are experts at this game and always make the best possible moves, and that Anna wins the game. (For reference, a *prime* number is any positive whole number that cannot be expressed as the product of two smaller whole numbers.)

* What’s the smallest number, larger than the answer to Unsustainable Agriculture last week, that Anna might have started with?*

**Bonus problem**

*Is it true that Anna can always win by playing the square of an odd prime, no matter which odd prime she chooses?*

### Solutions to Week 4

**Unsustainable Agriculture.** The relay is almost done! All of the relay answers will be revealed after that.

**Save the Camel.** The first key thing to observe is that the shares for the five younger siblings in the will must actually add up to just slightly more than one, because if they added up to one or less, then Jamal would not have run out of camels when handing out the different shares. So to figure out what was in the will, we are looking for five different fractions from 1/3 to 1/9 that add up to just slightly more than 1. The largest has to be 1/3, because if not then the biggest sum we could make would be 1/4 + 1/5 + 1/6 + 1/7 + 1/8 = 733/840 < 1. Similarly, the second-largest share has to be 1/4, because otherwise the biggest sum we could make would be 1/3 + 1/5 + 1/6 + 1/7 + 1/8 = 813/840 < 1. So we know that the will starts with shares of 1/3 and 1/4.

If you’ve gotten the hint, then you know that the next share is 1/6. (You can solve this problem without the hint, too; you just have to check that a number of other cases including a 1/5 share don’t work out.) Now there are just three possibilities left: there are two shares remaining to assign, and three possible fractions: 1/7, 1/8, and 1/9. If you don’t have 1/7, you get 1/3 + 1/4 + 1/6 + 1/8 + 1/9 = 71/72 < 1, so that doesn’t work. If you don’t have 1/8, you get shares of 1/3, 1/4, 1/6, 1/7, and 1/9. The LCM of 3, 4, 5, 7, and 9 is 4 × 7 × 9 = 252, so the shares for the siblings would be 84, 63, 42, 36, and 28, which total to 253, one over – so that’s looking pretty good. For completeness’ sake, we check shares of 1/3, 1/4, 1/6, 1/7, and 1/8. In this case, the LCM would be 8 × 7 × 3 = 168. The shares would be 56, 42, 28, 24, and 21, which total to 171 – three over, which doesn’t fit the story, because Jamal would have needed three extra camels. Hence, the shares are 1/3, 1/4, 1/6, 1/7, and 1/9, and the original size of the herd is 253 camels.

*Another history note from the Coach –*

A fraction expressed as a sum of different fractions with numerator equal to one is sometimes called an “Egyptian fraction,” because that’s how the ancient Egyptians liked to do their arithmetic with fractions. It makes some things easier, like comparing fractions, and some things harder, like multiplying them.

### Previous Weeks

**Week 4: Unsustainable Agriculture & Save the Camel, solutions to Week 3
Week 3: Deranged Assistant & Rush Job, solutions to Week 2
Week 2: Carambola Orchard & Farm Roundup, solutions to Week 1
Week 1: Instant Interrogation & Urn Respect**

**Find more puzzles** at varsity.momath.org.