Consider a row of 1000 playing cards, all face down. You ring up 999 friends and ask them all to come round for a game of cards. The first friend goes along the row of cards and turns over every one. The second friend goes along the row of cards and turns over every second card. The third friend goes along the row of cards and turns over every third card. This repeats for each of your 999 friends. Finally, you go along the row of cards and turn over every 1000th card (i.e. the last card). How many cards are left face up at the end?
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.
Firstly, notice that a card is only left face up at the end if it has been turned over an odd number of times. For the vast majority of cards this will not be the case because factors tend to come in pairs (for example, the factors of 8 are 1 & 8 and 2 & 4 . The only case when factors don't come in pairs is when the factor is the square root of the number. Therefore, the only cards which are left face up (i.e. will have been turned over an odd number of times) will be perfect squares. For example, the factors of 1 6 are 1 & 1 6 , 2 & 8 and 4 . Hence, our solution will be the number of positive integers whose squares are less than 1,000.
Testing out a few numbers by squaring them yields that 3 1 2 = 9 6 1 but 3 2 2 = 1 0 2 4 , which is clearly greater than 1 , 0 0 0 . So number of cards which are turned over an odd number of times, and which are hence left face-up, is 31. The solution is thus 3 1 .