1 00:00:06,720 --> 00:00:10,354 Your rich, eccentric uncle just passed away, 2 00:00:10,354 --> 00:00:16,854 and you and your 99 nasty relatives have been invited to the reading of his will. 3 00:00:16,854 --> 00:00:19,374 He wanted to leave all of his money to you, 4 00:00:19,374 --> 00:00:24,805 but he knew that if he did, your relatives would pester you forever. 5 00:00:24,805 --> 00:00:27,062 So he is banking on the fact 6 00:00:27,062 --> 00:00:32,660 that he taught you everything you need to know about riddles. 7 00:00:32,660 --> 00:00:35,558 Your uncle left the following note in his will: 8 00:00:35,558 --> 00:00:37,777 "I have created a puzzle. 9 00:00:37,777 --> 00:00:42,028 If all 100 of you answer it together, you will share the money evenly. 10 00:00:42,028 --> 00:00:46,185 However, if you are the first to find the pattern and solve the problem 11 00:00:46,185 --> 00:00:48,721 without going through all of the leg work, 12 00:00:48,721 --> 00:00:52,521 you will get the entire inheritance all to yourself. 13 00:00:52,521 --> 00:00:54,098 Good luck." 14 00:00:54,098 --> 00:00:58,929 The lawyer takes you and your 99 relatives to a secret room in the mansion 15 00:00:58,929 --> 00:01:01,795 that contains 100 lockers, 16 00:01:01,795 --> 00:01:04,270 each hiding a single word. 17 00:01:04,270 --> 00:01:05,440 He explains: 18 00:01:05,440 --> 00:01:09,805 Every relative is assigned a number from 1 to 100. 19 00:01:09,805 --> 00:01:12,705 Heir 1 will open every locker. 20 00:01:12,705 --> 00:01:16,702 Heir 2 will then close every second locker. 21 00:01:16,702 --> 00:01:20,879 Heir 3 will change the status of every third locker, 22 00:01:20,879 --> 00:01:23,775 specifically if it's open, she'll close it, 23 00:01:23,775 --> 00:01:26,580 but if it's closed, she'll open it. 24 00:01:26,580 --> 00:01:31,179 This pattern will continue until all 100 of you have gone. 25 00:01:31,179 --> 00:01:34,462 The words in the lockers that remain open at the end 26 00:01:34,462 --> 00:01:38,037 will help you crack the code for the safe. 27 00:01:38,037 --> 00:01:42,644 Before cousin Thaddeus can even start down the line, 28 00:01:42,644 --> 00:01:49,012 you step forward and tell the lawyer you know which lockers will remain open. 29 00:01:49,012 --> 00:01:51,366 But how? 30 00:01:51,366 --> 00:01:54,332 Pause the video now if you want to figure it out for yourself! 31 00:01:54,332 --> 00:01:55,421 Answer in: 3 32 00:01:55,421 --> 00:01:56,577 Answer in: 2 33 00:01:56,577 --> 00:01:58,248 Answer in: 1 34 00:01:58,248 --> 00:02:02,151 The key is realizing that the number of times a locker is touched 35 00:02:02,151 --> 00:02:06,427 is the same as the number of factors in the locker number. 36 00:02:06,427 --> 00:02:09,064 For example, in locker #6, 37 00:02:09,064 --> 00:02:10,708 Person 1 will open it, 38 00:02:10,708 --> 00:02:12,602 Person 2 will close it, 39 00:02:12,602 --> 00:02:14,316 Person 3 will open it, 40 00:02:14,316 --> 00:02:17,212 and Person 6 will close it. 41 00:02:17,212 --> 00:02:22,332 The numbers 1, 2, 3, and 6 are the factors of 6. 42 00:02:22,332 --> 00:02:25,165 So when a locker has an even number of factors 43 00:02:25,165 --> 00:02:26,812 it will remain closed, 44 00:02:26,812 --> 00:02:28,833 and when it has an odd number of factors, 45 00:02:28,833 --> 00:02:30,962 it will remain open. 46 00:02:30,962 --> 00:02:33,953 Most of the lockers have an even number of factors, 47 00:02:33,953 --> 00:02:37,713 which makes sense because factors naturally pair up. 48 00:02:37,713 --> 00:02:41,475 In fact, the only lockers that have an odd number of factors 49 00:02:41,475 --> 00:02:43,774 are perfect squares 50 00:02:43,774 --> 00:02:48,952 because those have one factor that when multiplied by itself equals the number. 51 00:02:48,952 --> 00:02:51,334 For Locker 9, 1 will open it, 52 00:02:51,334 --> 00:02:52,818 3 will close, 53 00:02:52,818 --> 00:02:54,934 and 9 will open it. 54 00:02:54,934 --> 00:02:57,094 3 x 3 = 9, 55 00:02:57,094 --> 00:02:59,379 but the 3 can only be counted once. 56 00:02:59,379 --> 00:03:04,529 Therefore, every locker that is a perfect square will remain open. 57 00:03:04,529 --> 00:03:07,426 You know that these ten lockers are the solution, 58 00:03:07,426 --> 00:03:11,285 so you open them immediately and read the words inside: 59 00:03:11,285 --> 00:03:17,043 "The code is the first five lockers touched only twice." 60 00:03:17,043 --> 00:03:21,881 You realize that the only lockers touched twice have to be prime numbers 61 00:03:21,881 --> 00:03:24,454 since each only has two factors: 62 00:03:24,454 --> 00:03:26,508 1 and itself. 63 00:03:26,508 --> 00:03:30,835 So the code is 2-3-5-7-11. 64 00:03:30,835 --> 00:03:33,209 The lawyer brings you to the safe, 65 00:03:33,209 --> 00:03:35,045 and you claim your inheritance. 66 00:03:35,045 --> 00:03:38,527 Too bad your relatives were always too busy being nasty to each other 67 00:03:38,527 --> 00:03:41,344 to pay attention to your eccentric uncle's riddles.