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.