Hello this is Presh Talwalkar. You credit card number probably looks pretty random to you. But hidden inside those mathematical digits, is a secret mathematical code. In this video, I’ll teach you a magic trick based on this pattern You’ll need a credit card, a debit card, or an ATM card that has 16 digits. You’ll also want a pencil and paper to do simple calculations. For this video, I’m going to do the calculation for the number that’s written on the screen, but you should follow along with your credit card number. To get started, focus on the sixteen digits in the number, and separate them into two groups. For the first step, add up every other digit. In this case, the digits which are colored in black. We’ll add up 1, 3, 5, 7 ,8, 0, 0, 0, to get to a sum of 24. We’ll go ahead and double this result. 24*2 is 48 Now look at the numbers which you just added up Count the number of digits which are 5 or larger In this case, the numbers five, seven, and eight, are five or larger, so that means that there are three numbers that are five and larger Finally, add up the remaining digits. These are the digits that are colored in blue. 2 + 4 + 6 + 8 + 9 + 0 + 0 + 0 This gives a sum of 29 Now we’re ready to do the magic part We have three numbers, 48, 3 , and 29. When you add up these three numbers, we’re going to end up with a number, who’s last digit is 0 And this is true, for every single credit card number So that’s the magic part, you can have someone do this, they’ll do these calculations and then you are going to say” Alright look at your number at the last digit is zero” You might be wondering why this works. This, in fact, is a mathematical code, that is programmed into your credit card number. The reason it’s in there is because, if you every typed your credit card number into a website and you accidentaly typed the wrong number, the website doesn’t know, that it needs to know how to validate a correct number from a incorrect number. So this is one way that they check that you’ve typed in a credit card number that’s valid. If you end up with a sum whose last digit is not zero, then that means that you probably typed in your credit card number incorrectly So that’s a pretty neat magic trick and someone who doesn’t know that this is encoded in the magi~ in the credit card number, is going to be surprised you knew the last digit of this number is zero Thanks for watching this video! Please subscribe to my channel, I make videos on math and game theory. You can catch me on my blog MindYourDecisions which you can follow on Facebook, Google+, and Patreon. You can catch me on social media @preshtalwalkar. And please check out my books. I’ve written a detailed description of each one in the description for this video.