You and your friend are playing a game. The game goes as follows:
For example, if you are given you can choose and give to your friend. Then, .
Play continues in this fashion until one person is given , at which point that person loses.
Given that you and your friend will both play optimally, how many positive integers are there such that, when given at the start, you will always win?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
You should get an even integer in the beginning. Then, your strategy is to subtract 1 from all the integers you are given. (You can do this because 1 is a factor of every positive integer, except perhaps 1 .) In this way, you will always give your friend odd integers, and your friend can only give you even integers, regardless of how your friend subtracts. This is because odd integers have only odd factors e.g. 1 5 has proper factors 1 , 3 and 5 . Since subtracting an odd from an odd yields an even, your friend is forced to give you even numbers.
Eventually, you will reach a point where you get the integer 2 , and you give 2 − 1 = 1 to your friend. You win the game. On the other hand, your friend can never win because 1 is odd, and she can only produce even integers. (Conversely, if you are given an odd integer, then your friend can utilize the strategy to win, so you'll always lose.)
Thus, our solution is the number of even integers between 1 and 2 0 1 5 . This is 1 0 0 7 .