 Hi, my name is Ashish and I make math videos at Khan Academy. And I'm here today because of this hashtag. Something remarkable is happening on YouTube this month. Check out hashtag mega-fave numbers. A lot of math YouTubers have come together to talk about their favorite math numbers greater than a million. If you haven't watched these videos, I highly recommend that you give them a try. I've been following some of them for a decade now and they've been my greatest source of inspiration. I invited us to participate and I couldn't stop myself from making a video. So let's get to the point. What's my favorite mega number? That's a really hard question. What's my favorite number? This isn't helping either. Well, what's my favorite thing about numbers? Aha! I love when numbers talk. I know it sounds silly at first, but numbers do talk. I've had so many interesting unforgettable conversations with numbers and I'm actually planning to bring one of them in this video. Okay, let's improve my question. What's my favorite conversation with a mega number? Well, my favorite conversation with a mega number is this thing. Okay, let me introduce my friend here. We have 2 decillion, 619 non-alien, 995 octalien, 643 septalien, 649 sextalien, 944 quintalien, 960 quadrillion, 380 trillion, 551 billion, 432 million, 833,049. The fact that this number has 34 digits isn't at all the exciting part. Every number is an answer to a number of questions and I think that these questions are what make the numbers interesting and a specific question that I met 7 years ago is the following. We have to find the smallest number made up of only 13s that leaves a remainder 1 when divided by 2013. If you want, you can pause the video and think about how to solve this problem, but don't worry about the answer. We already have that. Think about how you would approach this problem. Okay. Made up of only 13s, well, that means that the number that we're looking for has only 13 as its prime factor. We can write this number as 13 to the power n. Now let's look at this remainder business. Leaves the remainder 1 when divided by 2013 means that our number 13 to the power n is actually 1 more than some multiple of 2013. And to find the smallest number, we just need to make sure that the n sitting on top of 13 is as small as possible. We can give ourselves a round of applause here because now we're talking to this math question in a more mathy language. He's slowly beginning to open up. We're now looking at this. We need to find the smallest number n such that this equation makes sense. A power of 13 leaves a remainder 1 when divided by 2013. Exactly the same thing, but in numbers and equations. Where do we go from here? The power of 13 is a little shy at the moment and that 1 in the corner isn't talking either. Let's look at 2013 for a moment. Forget everything else. Focus on 2013. Let's get familiar with this number before we try anything else. Now, 2013 is not prime. It's a multiple of 3. In fact, if we break 671 down, the 6 and 1 in the corner add up to the 7 in the middle, so 671 is divisible by 11. This is what we have. We have the factors of 2013 right in front of us. There are 3, 11, and 61. What's interesting to note is that we can use this information to move the conversation ahead. The number that we're looking at leaves the remainder 1 when divided by 2013. Think about it. Shouldn't it behave the same when divided by the factors of 2013 as well? Can it leave the remainder 1 when divided by 3 by 11 or by 61? Amazing. Huge progress here. Now, let's talk to each of these baby questions one by one and let's hear what they have to tell us. I'm going to start with the smallest number first. Which power of 13 leaves the remainder 1 when divided by 3? I know that the first power does, 13 by 3 is 4, leaving the remainder 1. And how do we deal with this nth power of 13? It's time to introduce a mutual friend here, who can melt this 13 into two parts, a multiple of 3, and a remainder. Any guesses? Introducing binomial expansion. Now I know there are other tools in the box that we can use to solve this problem, but I'm deliberately choosing the ones that you've seen or will see in high school math. This expansion of a plus b to the power n is as follows. Don't worry about the coefficients for now. Only focus on powers of a and b. See how as we move to the next term, the power of a goes down by 1 and the power of b goes up by 1. This means that the last term will have no power of a and a full blown nth power of b. Think about this for a moment. How can we use this to break 13 down into some useful values a and b? Ready? Here's the fun part. All these terms, except the last term, have at least one a in them. In other words, they're all multiples of a. Now let's look at the last term. ncn is 1, a to the power 0 is 1, and so all we're left with is b to the power n. Thanks to the binomial expansion, we can say that a plus b to the power n is actually a bunch of multiples of a added to the nth power of b. I like to clean the clutter by combining these multiples to form a super-multiple of a. Funny name I know. We now have something that 13 and 3 can use to talk to each other. Want to give it a try? Okay. We can write 13 as 12 plus 1, which means that 13 to the power n is actually the sum of a bunch of multiples of 12 and 1 to the power n. Now looking at this, what can we say about the remainder when we divide 13 to the power n by 3, not 12, but by 3? Well, what's a multiple of 12 is also a multiple of 3. 3 will eat away all these multiples of 12 and we'll be left with only this one hanging around by himself. And that's always going to be the case for every value of n. Wow. This statement is always true. We've made tremendous progress, but we still need to gather more clues about n to get to our favorite mega number. Let's try talking to the second equation now. What power of 13 gives the remainder 1 when divided by 11? Not 3, not 2013, but 11. Give it a shot. Don't hesitate to use what we just learned. Yep. I'm talking about a new friend binomial expansion here. Using the same logic as before, we can say that 13 to the power n is equal to some multiple of 11 plus 2 to the power n, but that's not the remainder. We need to go deeper. We need to talk to 2 to the power n now. Our immediate problem is to find the remainder when 2 to the power n is divided by 11. Not sure if binomial expansion would be useful here, but let's not lose hope. 2 is a friendly number. Let's try some powers of 2 and see what the remainder we get. These are the first 4 powers of 2, 2, 4, 8 and 16, the usual suspects. They leave remainders 2, 4, 8 and 5. Even the 5th power isn't useful. But let's keep going. More powers of 2 ahead. These are the next 3 powers of 2, 64, 128 and 256. And they leave remainders 9, 7 and 3. They're all giving different unique remainders, but there's no sign of 1 yet. I mean, where is 1? Presenting the next 4 powers of 2. And with that, some good news. The 10th power of 2 leaves the remainder 1 when divided by 11. Yep. Finally, we found one value, one power of n, that leaves the remainder 1. But what's really going on here? The next 2 remainders are the same as the first 2 remainders. What are these powers trying to tell us? Let's get to the bottom of this. Here's the first 40 powers of 2 divided by 11. None of them leave a remainder 0, as there's no 11 in them. But what's also interesting to note is that these remainders come in cycles. The first 10 remainders keep repeating themselves. What's going on here? I encourage you to pause and think about this for a moment. Well, let's come back to a lab and do an experiment. Let's break the 12th power of 2 as a product of the 10th power of 2 and the second power of 2. Now, we know that the 10th power of 2 will leave a remainder 1 when divided by 11. Now, let's multiply these two terms and see what we get. Expanding this way gives two terms. The first one is a multiple of 11, and the second one is just 2 to the power 2 again. We can now see why the 12th power of 2 and the second power of 2 were giving the same remainders when divided by 11. And this is true for any two powers separated by 10. 6th power gives the same remainder as 16th power, 26th power, and 36th power. This table makes total sense now. Beautiful. Based on what we're seeing right here, we can say that the n that we're looking for has to be a multiple of 10. To get that one remainder that we want, we're looking for an n that is a multiple of 10. Let's step back a little. We started by 2013, 3 didn't tell us much, 11 told us that n is a multiple of 10. I wonder what 61 will tell us. Are you ready for this? What power of 13 leaves the remainder 1 when divided by 61? And both 61 and 13 are scary numbers, I know. But we have come too far to give up now. The first two powers of 13, when divided by 61, give remainders 13 and 47. Not at all nice numbers, I know. And at this moment, you begin to feel that maybe this number doesn't want to talk to us anymore. And right when you're about to give up, this number whispers in your ears and says, Hey buddy, this is really going great. Why don't you try just one more time? So that's what you do. The third power of 13 is 2197. Now there are a lot of different ways to divide here. But since I'm not interested in the quotient, I'm only interested in the remainder, I'll try repeated subtraction for a change. Subtracting multiple of 61 from 2197 to shrink it down, that's what I'm going to do. 61 times 30 is 1830, and if I subtract that, we're left with 367. 61 times 5 is 305, and subtracting that, we get 62. I'm already getting goosebumps. Subtracting one more 61, we get the remainder 1. Yay, third time's the charm. The third power of 13 actually, luckily, gave us the remainder 1 when divided by 61. Using whatever we have learned about powers and remainders in this video, we can confidently say that there are many more powers of 13 that behave the same. Any guesses? You're right. The sixth power, the ninth power, the twelfth power, the fifteenth power, the eighteenth power, and every power of 13, that is a multiple of 3, will give the remainder 1. So we got one more important clue about n, it has to be a multiple of 3. And we can check that too. My calculator broke after the thirteenth power, but you can see that the first few powers behave exactly as expected. Remarkable. Alright, time to fit all the pieces together. The power of 13 that we're looking for should leave remainder 1 when divided by 2013. And we can guarantee that this will happen if it leaves the remainder 1 when divided by the factors of 2013. Now 3 doesn't have a lot of problems. But 11 wants n to be a multiple of 10, and 61 wants n to be a multiple of 3. And don't forget that we want n to be as small as possible. Let's give ourselves a huge round of applause because we're finally there. The lowest common multiple of 3 in 10 is 30. And that's our value of n. We finally did it, yay. The smallest number that's made up of only 13s that leaves the remainder of 1 when divided by 13 is 13 to the power 30. And that's my favorite mega number. Again, the number of the digits was not important at all. It was the composition that we had together which was important. And there's so much more left. What would have happened if in the last step we did not have 61 but some other number? What would have happened if we were looking for a different remainder? There were a number of places where our tools did not work. Are there better tools that we can use here? All of these questions and more. I'm leaving this for you to explore. But before you go, I'd like to ask you one last question. What's your favorite mega number? Thanks for watching. I hope you had as much fun as these numbers did. See you later.