Oh, that's a fixed point of an iterative (or recursive) function. That's a beautiful subject, deep and marvelous, and with real world applications. There's a certain temperature and pressure at which water can exist in three phases at once; solid, liquid, and gaseous. That's the triple point of water, and it is, you've guessed it, a fixed point. Nature generally does that one thing it knows how, and then it just keeps doing that to whatever comes out, so we should expect to find lots of fixed points. But it's not always just one fixed point. Sometimes it's a pair, where f(x) = y, and f(y) = x; or it's three points, or four, five... You've probably seen the Mandelbrot Set, and you may have wondered; "yes, it's beautiful, but what is it really?" It's a map, and it's a map of all the fixed points! Since Kaprekar's nice little game has a fixed point, there is a way to map it into the Mandelbrot Set, I don't know how to do it, and I won't be bothered to find out, but in some general sense, appropriately transmogrified, 6174 lives in there. And if you were to play this game yourself, you may note that on the way to the fixed point, some numbers pop up more than others, and some may even seem inevitable. And if you were to count the number of ways that you can get to a certain value, that number is a measure of the entropy of that value; that, in a very real sense, is what entropy is. Note that there is nothing random here: everything is deterministic. And yet there is entropy. And if you were to take the (in)famous Riemann zeta-function, which I am not going to write down here, and then replace the ones in the denominator with these entropy numbers, you'll get a Dirichlet L-function, and those tell of deep relations between physics, geometry, and number theory; and the subject of those relations is called Langland's Program. But by now I'm getting out of my depth, and maybe no longer know what I'm talking about. Like I said, it's a nice little game, and yet, if you play it right, it is like a sacred key that opens the doors to the universe, that you will finally see it. Thank you.
@@PrimeNewtons he used to stay in a very small room. When he died, all his room was full of mathematical equations, even puzzles were solved on bus tickets also. Very much fond of speed. Always prefers to sit at window seat and just do calculations wrt speeds. I am proud that I came from his town, and had seen him almost everyday.
I’m so unlucky person guys, This legend was living in Deolali Gaon and I live almost 5-7 km away from his residence but I never heard about him. I think this is not just my fault it’s also foult of my education system or society! Some buddy like this legend with great knowledge in maths but i never heard about him in my hole life. This is really so unfortunate thing for me! Thanks to Prime Newton who introduced us about this legend! Love from India sir! 🇮🇳 ❤
I love how you are so excited to show off something you've discovered and haven't even read everything about it. That's the true spirit of a mathematician!
Revt.Dr.Kaprwker was my Guru... from 1978 to 1981 I had learnt maths of 5 th , 6th,7th standard from this Genius...at that time He lived in Abhinav Bharat ( Swatantravir Sawarkars Resd. ) in Nashik, Maharashtra...he took an annual fees Rs.1 from us ... when he died... India was unaware..BBC gave the bad new...while writing this my eyes are full of tears...The Man Of Simplicity... Prof.Raj Sinnarkar, Nashik
I learnt about Kaprekar constant and Kaprekar Routine back in 1983 when I was learning BASIC programming. It was such a joy to see the steps in the routine and finally reaching Kaprekar constant! Thank you for refreshing those memories. And I do love the enthusiasm and passion with which you communicate.
@@ppal64nothing, he was just born into human family. And you are committing like old fart aunty the moment you see the word Marathi. People are proud to be their mother tongue so keep your fingers to where they belong, yes, that’s your butts..
Actually marathi is a mother tongue language in India... Marathi speaking people are scattered throughout india but mainly marathi speaking state is Maharashtra...... And Mr. Kaprekar is a marathi man that is his mother tongue was marathi!!!!!
Afro Bro. More than that Kaprekar's constant your romantic pronounciation and english flavour are exciting. I loved your teaching sir. My salute and by touching your feet and spirit. Thanks from India.
Please for GOD sake ,please come out of bubble and say once that i am indian....if you feel first Maharashtrian or any other caste then you will never feel indian...i hope you will get this...
@@bittertruth27the day u say indian. Hindi states ppl mean north indian overlook u. Cuz according to north India India means Hindi. Even they also don't know Hindi is not their language. They lost their language due to Hindi.
I ran a python program to figure out how many times it takes for all numbers between 1000 and 9999 and it's true that 7 is the max. 9004, 9005, 9006 are examples of consecutive numbers with all 7 times. Same with 9015, 9016, and 9017.
@@vadimbe9783 Nice, that's correct for n >= 1000, but for n >= 1 (padded with leading zeros, e.g. by f'{n:04d}'), you will get 2184 numbers. Anyways the longest list of numbers is received for a target of 3 iterations (2124 for n >= 1000 and 2400 for n >= 1).
I'm an engineer. I wish I had a teacher like you in my maths class. It was a struggle but I eventually got there. To all those people struggling with maths do not be afraid to ask for help. Keep up the good work brother.
THANK YOU for sharing in such a nice and engaging way! Too good! I attended a short lecture by Mr. Kaprekar in Mumbai in 1983 (or '84), where he illustrated amazing properties of palindromic numbers. I was 15 then, and was one of the award recipients from Mr. Kaprekar in that very event, for finishing among the top 3 in a secondary-school level mathematics competition held at Mumbai's Nehru Planetarium. I not only enjoyed your video but also reminisced such a great event in my life!
Thank you for another wonderful and blessed video. I had not heard of Kaprekar's constant until now, so thank you for helping me to never stop learning. I think a proof (improved from an earlier version by reducing the number of cases) of the result that a unique invariant under the Max-Min process exists and equals 6174 goes like this. Label the 4 digits of the number N chosen as a4, a3, a2 and a1 in order from largest to smallest (the all equal case is excluded). Then the max and min numbers that can be formed from its digits are Max = 1000a4 + 100a3 + 10a2 + a1 Min = 1000a1 + 100a2 + 10a3 + a4. Hence Max-Min = 1000(a4-a1) + 100(a3-a2)+ 10(a2-a3) + (a1-a4). The latter two coefficients are non-positive, so "carry" to rewrite this expression as Max-Min = 1000(a4-a1) + 100(a3-a2-1) + 10(a2--a3+10-1) + (a1-a4+10). Hence Max-Min = abcd where a = a4-a1 b = a3-a2-1 c = a2-a3+9 d = a1-a4+10 denoted equations (1) unless a3=a2, in which case b above is negative and hence invalid and must be replaced with a3-a2-1+10 by carrying from a, which reduces to a4-a1-1. Note that c and d are always non-negative because both a2-a3 and a1-a4 are at least -9. a4, a3, a2 & a1 are now redefined as the 4 digits of the number abcd in order from largest to smallest, and the Max-Min process repeated. Note that they cannot all be equal again because a=d requires a4-a1=5, b=c requires a3-a2=5 and hence a=b requires 5=5-1=4, contradiction. And in the case where b is replaced by carrying from a, a=d requires a4--a1=11/2, contradiction. Note that when a3>a2 so that b above is non-negative and hence does not need to be replaced by carrying from a a+d=10 b+c=8 a>b because a4-a1 is at least as large as a3-a2, and c > or = d-1 for the same reason denoted conditions (2). Because it is invariant under the Max-Min process, the only possibilities for Kaprekar's constant are as follows. First note the possibility that its a3=a2 is excluded because if that was so: b = a3-a2-1+10 = 9, from which it follows that its a4=9 a = a4-a1-1 = 8-a1 c = a2-a3-1+10 = 9, from which it follows that its a3=9 and hence also that its a2=9 d = a1-a4+10 = a1+1 Hence the constant could only be: a1-999 where a1 = 8-a1 hence a1 = 4 and a1+1=9, contradiction. or 999-a1 where 9=8-a1 hence a1=-1, contradiction. Hence its a3>a2. Next note the inequality c > or = d -1 in conditions (2) is in fact strict because c = d-1 iff a4-a1 = a3-a2 iff a4=a3 and a2=a1 iff the constant has the form a3a3a2a2. But this and the second of equations (1) then mean a3 = b = a3-a2-1 hence a2=-1, contradiction. Hence c > d-1 hence c > or = d. This strengthened inequality, together with the inequality a>b in conditions (2), then mean the only possibilities for the constant are: Case 1: a4a3a2a1 Case 2: a4a2a3a1 Case 3: a4a1a3a2 Case 4: a3a2a4a1 Case 5: a3a1a4a2 Case 6: a2a1a4a3 where a4, a3, a2 & a1 satisfy equations (1). All cases lead to a contradiction except Case 5, which yields the result 6174. Case 1: a3=b=a3~a2-1 hence a2 = -1, contradiction. Cases 2 & 4: a1=d=a1-a4+10 hence a4=10, contradiction. Case 3: a4=a=a4-a1 hence a1=0 a1=b=a3-a2-1 hence a3=a2+1 a3=c=a2-a3+9 hence 2a3=a2+9 Hence 2a2 +2 = a2+9 hence a2=7 a2=d=a1-a4+10 hence a4=3 < a2, contradiction. Case 6: a2=a=a4-a1 hence a4=a1+a2 a1=b=a3-a2-1 hence a1+a2=a3-1 a4=c=a2-a3+9 hence a3+a4=a2+9 a3=d=a1-a4+10 hence a4=a1-a3+10 Substituting for a4 from the first equation into the last two equations gives a3+a1+a2=a2+9 hence a1+a3=9 a1+a2=a1-a3+10 hence a2+a3=10 Hence the second equation gives 9-a3+10-a3= a3-1 hence 3a3 = 20 hence a3=20/3, contradiction. Case 5: a3=a=a4-a1 hence a4=a1+a3 a1=b=a3-a2-1 hence a1+a2=a3-1 a4=c=a2-a3+9 hence a3=a2-a4+9 a2=d=a1-a4+10 hence a4=a1-a2+10 Substituting for a4 from the first equation into the last two equations gives a3=a2-a1-a3+9 hence 2a3=a2-a1+9 a1+a3=a1-a2+10 hence a3=10-a2 Hence 20-2a2=a2-a1+9 hence 3a2=11+a1 Hence the second equation gives a1+a2=9-a2 hence 2a2 = 9- a1 Hence 27-3a1 = 22+2a1 hence 5a1=5 Hence a1=1, a2=4, a3=6, a4=7. Hence Kaprekar's constant = a3a1a4a2 = 6174. Again, thank you for your lovely videos and i look forward to seeing the next one. God bless you ❤
According to Wolfeam & Wikipedia Consider an n-digit number k. Square it and add the right n digits to the left n or n-1 digits. If the resultant sum is k, then k is called a Kaprekar number. For example, 9 is a Kaprekar number since 9^2=81 8+1=9, and 297 is a Kaprekar number since 297^2=88209 88+209=297.
Your enthusiam is infectious! Your motto is fabulous - Never Stop Learning. I'm 63 and people think I'm nuts because I am alway learning something new. These things I learn will probably never be used - except of the wonder of I my learning it. AND THAT IS MORE THAN GOOD ENOUGH. I am thrilled to be a new subcriber to your channel.
I gotta love this man - so much enthusiasm, so much involvement, he makes science fun! And this is the greatest service one can do to science. Thank you so much for this presentation, truly brilliant!
There is another famous Indian mathematician who was largely self-taught: Ramanujan. He did amazing things with repeating fractions and much much more. He went to England to study further but sadly died very young. Perhaps you could talk about something he solved in one of your videos?
Would be interesting to see how that works in binairy. Maximum and minimum only depend on the total number of ones and total number of zeros. I wonder if it can be generalized for any base and any size analytically. And I have to figure out how it works in balanced ternary!
@@jahbiniThe biggest and smallest numbers generally won't be the same in other bases. They may not even have the same number of digits. There might be other constants in other bases though. Nice idea!
That is quite amazing. I never heard about that constant before. And: You have a very clear and beautiful hand writing. I think one of the best on UA-cam!
Finally, a math teacher who can write legibly! Too many math people don't write very well, so it's often hard to tell exactly what it is that they've written. 👍
...especially when greek letters suddenly come out to play but you don't know their names, or have trouble remembering them all and the upper and lower cases, grrr!
I came to know about Kaprekar's constant couple of years back. Thank you for covering this art of mathematics. Also, if I remember correctly, Numberphile made a video about most iterations required for a number to reach 6174 or like that.
Gentleman the way and excitement with which you teach... am very sure the students who love mathematics must be madly in love with the subject... God bless young man... _May all teachers of the world become like you..._ 🙏
Thanks for enlighting this very interesting subject. I made a few tests on an excel sheet with 2, 3 and 5 digit numbers by curiousity and got the interesting following results ! I hope you like my inquiry and study, tell me if you like it ! >For 2 digit numbers, the Kaprekar iteration process doesn't converge, but gives a cyclic set of following numbers after 7 iterations max: 9, 81, 63, 27, 45 and 9 again and so on. >For 5 digit numbers, the Kaprekar iteration process doesn't converge, but has got a different constant value (depending on the intial value) repeated every 4 iterations. The periodic behaviour seems to appear after 8 interations max. >And last, with 3 digit numbers, the Kaprekar iteration process converges towards the value 495 and seems to after 7 interations max. To finish with my post. There is a trivial result to be mentioned: The Kaprekar iteration process gives 0 as result for all intial numer having the same value for all digits. For example, 2222 gives 2222 as "max" and "min" so the there difference is 0. Greetings and keep up the good work !
Mathematics scares me, but your calmness is so inviting that it has actually sparked a curiosity in me about math. Teaching is an art, and you, sir, are an artist.
i made a model in excel using the formula "=VALUE(CONCAT(SORT(MID(A1,SEQUENCE(LEN(A1)),1),,1)))" and "=VALUE(CONCAT(SORT(MID(A1,SEQUENCE(LEN(A1)),1),,-1)))"i run it from 1000 to 9999 , it was fun to see which numbers to reach 7 times
I wonder if you can create an X, Y graph of the results that shows the number of steps it takes to get there - perhaps showing points of different colours according to the number of steps to get to 6174 - EG 1 step = red, 2 = orange, 3 yellow etc. I wonder what that would look like?
From one who loves unique math problems, this is instructive and fun. Works with 495,too, just use any 3 digit number. Thanks for introducing me to something new. I am passing it on. One 7th grade relative likes it and said he’ll show it to his math teacher tomorrow.
randomly came across this video n was happy to see another maths teacher with such enthusiasm- the first one was my 5th grade math teacher!! hugs from India!!
Coolest mathematics teacher.... Thank your sir for teaching something new... I belong to the state of kaprekar sir and now i m wondering why this theory was not in our school syllabus... This is the first time i am getting to hear about kaprekar constant... Thank you sir for teaching something new..
I wish you had been my maths teacher ....your enthusiasm would have made the subject I loathed most exciting and interesting.... You are so likeable ....
You don't need to prove it in a sophisticated way: there are just 10000 numbers just test them all. If you design a network of numbers, a graph with arrows (an oriented graph) from each number to the one applying this rule you will get a net where following the arrows you always get there. *And doesn't work with any numbers: for all numbers that have repeated 4 digits it will after one iteration give 0000* : 1111, 2222, etc. So the graph is not connected: it has two connected parts one that all arrows end in the Kaprekar constant and other where ll arrows end in 0000.
I am from India. I am not a big fan of Mathematics. However seeing the video title I got curious. It is simply amazing... (Because being an Indian whenever we think of Maths we only recollect Ramanujam a great wizard of Mathematics).
Yeah I noticed that as well. Both numbers consist of even and odd numbers in an alternating order. So there should be more such numbers I suppose and not only limited to subtraction. Number patterns are everywhere in nature so this ain't surprising. But still cool as heck.
Perhaps it's a coincidence, especially considering for the first example he introduced it, it wasn't produced like in the second. This would of course require further experimentation and research.
7325 --> 5175 --> 5994 --> 5355 --> 1998 --> 7993 --> 6174 It's important to note that any permutation of the numbers listed above also won't contain 8532 in their sequence. That being said, I just chose a 4-digit number at random and could've gotten lucky, so 8532 could still be common.
and you reach 495 for 3 digits number and for all 2 digit numbers except for repeating numbers, the end product will be 9. 6174 and 495 are multiples of nine. so the sequence of numbers produced are always multiples of nine. this is an artifact of how our numeric system works - each base has its own Kaprekar numbers and they are all related to the terminating digit of that base.
Curiously, the prime factorization of these three constants result in exactly two 3's, among other primes. Also, this doesn't work for four identical digits.
9 will give you 90-09 = 81, which then gives 81-18 = 63 followed by 63 - 36 = 27. Now 72-27 = 45 leads us to 54 - 45 = 09 and we're back where we started. We don't have a "end product", we have a loop.
Actually, studying the numbers XY00 with X≥Y (with the help of Excel…), I found that 4100, 5100, 5200, 6100, 8500, 9400, 9500 and 9600 were the numbers of this kind needing 7 steps. Funny enough, 6200 goes directly to 6174 (in 1 step), and is the only one of the kind. Thanks for your interesting videos !
Try to draw a directed graph (vertex/edge kind, not the plot) with all 1000 numbers as vertices and arrows pointing to the next vertex. Maybe start with two digit numbers to try the idea out first.
I never seen a video for maths, but today youtube suggested this video and i watched. its really a mind blowing fact and good to know. thanks to the creator of this video
Amazing! Thank you for introducing me to this concept. Truly fascinating. I used to hate Maths at school but am absolutely in awe of it now. Thanks for the video and stay happy.
Impossible. Here is a script created in JavaScript that proves that the max amount of iterations is 7. function kaprekarSteps(t){let e=0;for(;6174!==t;){let r=t.toString().padStart(4,"0");if(e+=1,0===(t=parseInt(r.split("").sort((t,e)=>e-t).join(""))-parseInt(r.split("").sort().join(""))))return 1/0}return e}function generateKaprekarReport(){let t=[];for(let e=0;e"Does not reach 6174"===t.steps?1:"Does not reach 6174"===e.steps?-1:e.steps-t.steps);let e=t.map(t=>`${t.number}: ${t.steps} iterations`).join(" ");console.log(e)}generateKaprekarReport();
I saw that too and I couldn't find a number mentioned; after doing a Google search, i read somewhere that in certain bases (ie 13) it might take 8 iterations; if there is a base 10 number that takes 8 iterations I haven't seen it
The number 6174 is known as Kaprekar's constant[ 1][ 2][ 3] after the Indian mathematician D. R. Kaprekar. This number is renowned for the following rule: Take any four-digit number, using at least two different digits (leading zeros are allowed).
Oh, that's a fixed point of an iterative (or recursive) function. That's a beautiful subject, deep and marvelous, and with real world applications. There's a certain temperature and pressure at which water can exist in three phases at once; solid, liquid, and gaseous. That's the triple point of water, and it is, you've guessed it, a fixed point.
Nature generally does that one thing it knows how, and then it just keeps doing that to whatever comes out, so we should expect to find lots of fixed points. But it's not always just one fixed point. Sometimes it's a pair, where f(x) = y, and f(y) = x; or it's three points, or four, five...
You've probably seen the Mandelbrot Set, and you may have wondered; "yes, it's beautiful, but what is it really?"
It's a map, and it's a map of all the fixed points! Since Kaprekar's nice little game has a fixed point, there is a way to map it into the Mandelbrot Set, I don't know how to do it, and I won't be bothered to find out, but in some general sense, appropriately transmogrified, 6174 lives in there.
And if you were to play this game yourself, you may note that on the way to the fixed point, some numbers pop up more than others, and some may even seem inevitable. And if you were to count the number of ways that you can get to a certain value, that number is a measure of the entropy of that value; that, in a very real sense, is what entropy is. Note that there is nothing random here: everything is deterministic. And yet there is entropy. And if you were to take the (in)famous Riemann zeta-function, which I am not going to write down here, and then replace the ones in the denominator with these entropy numbers, you'll get a Dirichlet L-function, and those tell of deep relations between physics, geometry, and number theory; and the subject of those relations is called Langland's Program. But by now I'm getting out of my depth, and maybe no longer know what I'm talking about.
Like I said, it's a nice little game, and yet, if you play it right, it is like a sacred key that opens the doors to the universe, that you will finally see it.
Thank you.
Beautiful narrative.
How could all of this be a mistake ? Such intelligent design ? Thank you for your detailed comment o stranger
@@realitycheck816 certainly not coincidence some of us believe the lord is all
your explanation is interesting😊
what's the real-world application of the Kaprekar constant?
I am fortunate to listen kaprekar sir in my school days
That guy in thumbnail seems like wearing some Marathi culture clothing!?
@@mattdamon2084 Because he was!
Really? Where?
@@mattdamon2084he is😂😊
I have learned something new today and it was fun learning.
I have seen him in person. We used to stay @100 m from each other. Simple man, used to walk around with his umbrella. I was school going boy then.
That makes you a part of the history of mathematics.
@@PrimeNewtons he used to stay in a very small room. When he died, all his room was full of mathematical equations, even puzzles were solved on bus tickets also. Very much fond of speed. Always prefers to sit at window seat and just do calculations wrt speeds. I am proud that I came from his town, and had seen him almost everyday.
@@kulkashishhow lucky!!
Where he lives in Pune?? Address pls
I thought you were going to say, "I lived 6174 ft. from his house" 😂!
I’m so unlucky person guys,
This legend was living in Deolali Gaon and I live almost 5-7 km away from his residence but I never heard about him. I think this is not just my fault it’s also foult of my education system or society!
Some buddy like this legend with great knowledge in maths but i never heard about him in my hole life.
This is really so unfortunate thing for me!
Thanks to Prime Newton who introduced us about this legend!
Love from India sir! 🇮🇳 ❤
😂😂😂
As an Indian I never knew there is something like this. Thanks a loads
Indian knows a lot about the number, that;s why many of them working at the 07-11....LOL
Oh wow.
Expert @@yrot1123
@@yrot1123 thoughtful comment... feeling proud about your "wit", no doubt
Hahhaha indians are the highest earning individuals in usa
I love how you are so excited to show off something you've discovered and haven't even read everything about it. That's the true spirit of a mathematician!
depriciation?
Sarcasm 😂
Fantastic
Being from Maharashtra, i don't know about him and his contribution, thankyou for bringing this 🙏Jai Maharashtra
Revt.Dr.Kaprwker was my Guru... from 1978 to 1981 I had learnt maths of 5 th , 6th,7th standard from this Genius...at that time He lived in Abhinav Bharat ( Swatantravir Sawarkars Resd. ) in Nashik, Maharashtra...he took an annual fees Rs.1 from us ... when he died... India was unaware..BBC gave the bad new...while writing this my eyes are full of tears...The Man Of Simplicity...
Prof.Raj Sinnarkar, Nashik
I learnt about Kaprekar constant and Kaprekar Routine back in 1983 when I was learning BASIC programming. It was such a joy to see the steps in the routine and finally reaching Kaprekar constant!
Thank you for refreshing those memories. And I do love the enthusiasm and passion with which you communicate.
Proud to be Marathi, and Marathi scientists. Thank you for bringing this up 😊
🙌
What did you do to be Marathi?
Yeah this is new disease these days in indians that do nothing and feel proud...
@@ppal64nothing, he was just born into human family. And you are committing like old fart aunty the moment you see the word Marathi. People are proud to be their mother tongue so keep your fingers to where they belong, yes, that’s your butts..
Actually marathi is a mother tongue language in India... Marathi speaking people are scattered throughout india but mainly marathi speaking state is Maharashtra...... And Mr. Kaprekar is a marathi man that is his mother tongue was marathi!!!!!
Fascinating! I haven’t been in a math class for 50 years. I can’t wait to share this with my grandchildren. What a fun math concept! ❤
Please do!
Afro Bro. More than that Kaprekar's constant your romantic pronounciation and english flavour are exciting. I loved your teaching sir. My salute and by touching your feet and spirit. Thanks from India.
You are a true AH, should not bring race in every breath
True @@nripensaha2210
@@nripensaha2210Funny you! Why shouldn't him bring admiration to race of the teacher's spoken accent.
I love your contagious playful enthusiastic energy! In Peace and Friendship,
Pierre Pagé
Thank you, Pierre.
Wow! I am a Maharashtrian and had never heard of this math genius. Thank you for re-introducing this to the world.
Please for GOD sake ,please come out of bubble and say once that i am indian....if you feel first Maharashtrian or any other caste then you will never feel indian...i hope you will get this...
@@bittertruth27the day u say indian. Hindi states ppl mean north indian overlook u. Cuz according to north India India means Hindi. Even they also don't know Hindi is not their language. They lost their language due to Hindi.
@@Dattebayo3089 true...👍👍..
I ran a python program to figure out how many times it takes for all numbers between 1000 and 9999 and it's true that 7 is the max. 9004, 9005, 9006 are examples of consecutive numbers with all 7 times. Same with 9015, 9016, and 9017.
I also wrote a Python program - looks like there are 1980 four digit numbers which require 7 iterations, the smallest being 1004 and the largest 9985
Javascript programmer here. But would you mind sharing your git? I am very interested in learning more maths myself snd contributing to it.
@@juangalton999 Try it yourself. It's easy. Just some looping.
@@vadimbe9783 the smallest is 0014. And 3 consecutive numbers with all 7 steps:
0014 -> 4086 -> 8172 -> 7443 -> 3996 -> 6264 -> 4176 -> 6174 (7 steps)
0015 -> 5085 -> 7992 -> 7173 -> 6354 -> 3087 -> 8352 -> 6174 (7 steps)
0016 -> 6084 -> 8172 -> 7443 -> 3996 -> 6264 -> 4176 -> 6174 (7 steps)
@@vadimbe9783 Nice, that's correct for n >= 1000, but for n >= 1 (padded with leading zeros, e.g. by f'{n:04d}'), you will get 2184 numbers. Anyways the longest list of numbers is received for a target of 3 iterations (2124 for n >= 1000 and 2400 for n >= 1).
I'm an engineer. I wish I had a teacher like you in my maths class. It was a struggle but I eventually got there. To all those people struggling with maths do not be afraid to ask for help. Keep up the good work brother.
I agree. He is amazing. From old retired PhD engineer.
Delighted.
I have never heard of Kaprekars constant.
Thanks.
This number is in you, in time and more, I invite you to see Universum 6174
THANK YOU for sharing in such a nice and engaging way! Too good! I attended a short lecture by Mr. Kaprekar in Mumbai in 1983 (or '84), where he illustrated amazing properties of palindromic numbers. I was 15 then, and was one of the award recipients from Mr. Kaprekar in that very event, for finishing among the top 3 in a secondary-school level mathematics competition held at Mumbai's Nehru Planetarium. I not only enjoyed your video but also reminisced such a great event in my life!
Thank you for another wonderful and blessed video.
I had not heard of Kaprekar's constant until now, so thank you for helping me to never stop learning.
I think a proof (improved from an earlier version by reducing the number of cases) of the result that a unique invariant under the Max-Min process exists and equals 6174 goes like this.
Label the 4 digits of the number N chosen as a4, a3, a2 and a1 in order from largest to smallest (the all equal case is excluded).
Then the max and min numbers that can be formed from its digits are
Max = 1000a4 + 100a3 + 10a2 + a1
Min = 1000a1 + 100a2 + 10a3 + a4.
Hence
Max-Min = 1000(a4-a1) + 100(a3-a2)+ 10(a2-a3) + (a1-a4).
The latter two coefficients are non-positive, so "carry" to rewrite this expression as
Max-Min = 1000(a4-a1) + 100(a3-a2-1) + 10(a2--a3+10-1) + (a1-a4+10).
Hence Max-Min = abcd where
a = a4-a1
b = a3-a2-1
c = a2-a3+9
d = a1-a4+10
denoted equations (1)
unless a3=a2, in which case b above is negative and hence invalid and must be replaced with a3-a2-1+10 by carrying from a, which reduces to a4-a1-1. Note that c and d are always non-negative because both a2-a3 and a1-a4 are at least -9.
a4, a3, a2 & a1 are now redefined as the 4 digits of the number abcd in order from largest to smallest, and the Max-Min process repeated. Note that they cannot all be equal again because a=d requires a4-a1=5, b=c requires a3-a2=5 and hence a=b requires 5=5-1=4, contradiction. And in the case where b is replaced by carrying from a, a=d requires a4--a1=11/2, contradiction.
Note that when a3>a2 so that b above is non-negative and hence does not need to be replaced by carrying from a
a+d=10
b+c=8
a>b because a4-a1 is at least as large as a3-a2, and
c > or = d-1 for the same reason
denoted conditions (2).
Because it is invariant under the Max-Min process, the only possibilities for Kaprekar's constant are as follows.
First note the possibility that its a3=a2 is excluded because if that was so:
b = a3-a2-1+10 = 9, from which it follows that its a4=9
a = a4-a1-1 = 8-a1
c = a2-a3-1+10 = 9, from which it follows that its a3=9 and hence also that its a2=9
d = a1-a4+10 = a1+1
Hence the constant could only be:
a1-999 where a1 = 8-a1 hence a1 = 4 and a1+1=9, contradiction. or
999-a1 where 9=8-a1 hence a1=-1, contradiction.
Hence its a3>a2.
Next note the inequality c > or = d -1 in conditions (2) is in fact strict because c = d-1 iff a4-a1 = a3-a2 iff a4=a3 and a2=a1 iff the constant has the form a3a3a2a2. But this and the second of equations (1) then mean a3 = b = a3-a2-1 hence a2=-1, contradiction.
Hence c > d-1 hence c > or = d.
This strengthened inequality, together with the inequality a>b in conditions (2), then mean the only possibilities for the constant are:
Case 1: a4a3a2a1
Case 2: a4a2a3a1
Case 3: a4a1a3a2
Case 4: a3a2a4a1
Case 5: a3a1a4a2
Case 6: a2a1a4a3
where a4, a3, a2 & a1 satisfy equations (1).
All cases lead to a contradiction except Case 5, which yields the result 6174.
Case 1: a3=b=a3~a2-1 hence a2 = -1, contradiction.
Cases 2 & 4: a1=d=a1-a4+10 hence a4=10, contradiction.
Case 3: a4=a=a4-a1 hence a1=0
a1=b=a3-a2-1 hence a3=a2+1
a3=c=a2-a3+9 hence 2a3=a2+9
Hence 2a2 +2 = a2+9 hence a2=7
a2=d=a1-a4+10 hence a4=3 < a2, contradiction.
Case 6: a2=a=a4-a1 hence a4=a1+a2
a1=b=a3-a2-1 hence a1+a2=a3-1
a4=c=a2-a3+9 hence a3+a4=a2+9
a3=d=a1-a4+10 hence a4=a1-a3+10
Substituting for a4 from the first equation into the last two equations gives
a3+a1+a2=a2+9 hence a1+a3=9
a1+a2=a1-a3+10 hence a2+a3=10
Hence the second equation gives 9-a3+10-a3= a3-1 hence 3a3 = 20 hence a3=20/3, contradiction.
Case 5: a3=a=a4-a1 hence a4=a1+a3
a1=b=a3-a2-1 hence a1+a2=a3-1
a4=c=a2-a3+9 hence a3=a2-a4+9
a2=d=a1-a4+10 hence a4=a1-a2+10
Substituting for a4 from the first equation into the last two equations gives
a3=a2-a1-a3+9 hence 2a3=a2-a1+9
a1+a3=a1-a2+10 hence a3=10-a2
Hence 20-2a2=a2-a1+9 hence 3a2=11+a1
Hence the second equation gives a1+a2=9-a2 hence 2a2 = 9- a1
Hence 27-3a1 = 22+2a1 hence 5a1=5
Hence a1=1, a2=4, a3=6, a4=7.
Hence Kaprekar's constant = a3a1a4a2 = 6174.
Again, thank you for your lovely videos and i look forward to seeing the next one. God bless you ❤
Man, you are good
Very elaborate working. Is this the way mathematicians really work .Oh my God.
Mind boggling! True logical, mathematical mind . Hats off for proving 6174 is constant other way 😊
My brain cannot handle your comment
Felicitări pentru democrație. ❤
Maths is full of wonder but you also bring joy, and that’s how the love of something so important can spread. Thank you!
"Recreational Mathematician" sounds so much better than "retired math teacher". Thank you for this wonderful spin.
Very cool👍
According to Wolfeam & Wikipedia
Consider an n-digit number k. Square it and add the right n digits to the left n or n-1 digits. If the resultant sum is k, then k is called a Kaprekar number. For example, 9 is a Kaprekar number since
9^2=81 8+1=9,
and 297 is a Kaprekar number since
297^2=88209 88+209=297.
That writing is so clean
fr
I'm pretty sure it's because he's a robot. Or an Alien... I haven't figured that out yet. Honestly, I'm waiting for him to tell me.
@@bipolarbear7325 🤖👽
Your enthusiam is infectious! Your motto is fabulous - Never Stop Learning. I'm 63 and people think I'm nuts because I am alway learning something new. These things I learn will probably never be used - except of the wonder of I my learning it. AND THAT IS MORE THAN GOOD ENOUGH. I am thrilled to be a new subcriber to your channel.
I gotta love this man - so much enthusiasm, so much involvement, he makes science fun! And this is the greatest service one can do to science. Thank you so much for this presentation, truly brilliant!
I love the energy and joy you bring into the subject.
There is another famous Indian mathematician who was largely self-taught: Ramanujan. He did amazing things with repeating fractions and much much more. He went to England to study further but sadly died very young. Perhaps you could talk about something he solved in one of your videos?
Boy : tons of stuff,,,,, even not yet proven!
@@jceepf will never be proven by anyone, for that we will need to search for another ramanujan from india.
Yeah i would love a video on Ramanujan 's paradox
Really
But not about the infinite sum of natural numbers. Everybody know it’s bullshit still speaking about it only because it was from Ramanujan
I am from Maharashtra, I am Marathi and yet I had never heard about him before.. thanks for introducing him, the constant theory is interesting
Thank you.
I showed the whole family.
Messed it up first,but got it right 2nd time.
Collective amazement!
Your classes are so therapeutic and I have never seen anyone who draw a perfect straight line on board like you do..bravo..🎉
I can't seem to be able to draw one with a straitedge! 😅
I love it! Now I want to write a program hack to search the n-digit numbers for their endpoints and rates of convergence..... Thanks for the tip!
And can it work in different bases? and ...
Would be interesting to see how that works in binairy. Maximum and minimum only depend on the total number of ones and total number of zeros. I wonder if it can be generalized for any base and any size analytically. And I have to figure out how it works in balanced ternary!
@@jahbiniThe biggest and smallest numbers generally won't be the same in other bases. They may not even have the same number of digits.
There might be other constants in other bases though.
Nice idea!
That is quite amazing. I never heard about that constant before.
And: You have a very clear and beautiful hand writing. I think one of the best on UA-cam!
Humans are essentially curious by nature. You help to bring out the curiosity and wonder in all of your videos. Bravo, sir! Take a bow!
Excellent lesson professor. I had no idea about this mathematical ‘wonder’.👏👏👏👏
O wooooow....!!!!
I am from Mumbai, India but I wasn't aware of this fact .
Great to know about a great Maharashtrian mathematician.
Finally, a math teacher who can write legibly! Too many math people don't write very well, so it's often hard to tell exactly what it is that they've written. 👍
...especially when greek letters suddenly come out to play but you don't know their names, or have trouble remembering them all and the upper and lower cases, grrr!
Started with 2438. It took 8 steps =4176. Thanks for sharing.
@@duku3535
1. 8432-2348=6084
2. 8640-0468=8172
3. 8721-1278=7443
4. 7443-3447=3996
5. 9963-3699=6264
6. 6642-2466=4176
7. 7641-1467=6174
Took me 7 steps, not 8.
A wonderful maths game i never new this gentle man who invented this constant is from my country. And you are a good teacher
I came to know about Kaprekar's constant couple of years back.
Thank you for covering this art of mathematics.
Also, if I remember correctly, Numberphile made a video about most iterations required for a number to reach 6174 or like that.
You are a very inspirational teacher. Your enthusiasm for your subject shines through.
Gentleman the way and excitement with which you teach... am very sure the students who love mathematics must be madly in love with the subject...
God bless young man... _May all teachers of the world become like you..._
🙏
Thanks for enlighting this very interesting subject.
I made a few tests on an excel sheet with 2, 3 and 5 digit numbers by curiousity and got the interesting following results !
I hope you like my inquiry and study, tell me if you like it !
>For 2 digit numbers, the Kaprekar iteration process doesn't converge, but gives a cyclic set of following numbers after 7 iterations max:
9, 81, 63, 27, 45 and 9 again and so on.
>For 5 digit numbers, the Kaprekar iteration process doesn't converge, but has got a different constant value (depending on the intial value) repeated every 4 iterations.
The periodic behaviour seems to appear after 8 interations max.
>And last, with 3 digit numbers, the Kaprekar iteration process converges towards the value 495 and seems to after 7 interations max.
To finish with my post. There is a trivial result to be mentioned: The Kaprekar iteration process gives 0 as result for all intial numer having the same value for all digits.
For example, 2222 gives 2222 as "max" and "min" so the there difference is 0.
Greetings and keep up the good work !
Interesting that. I've personally never heard of Kapreka's Constant so thanks for introducing me to this phenomenon.
I’ve spent the las forty years of my life hating math with a passion, yet this video has done the impossible, it’s gotten me interested in math!
A very interesting result.I tried it on some random four digit number , and after a few steps I reached Kaprekar's constant.
Set Theory + Number Theory = Magic
Mathematics scares me, but your calmness is so inviting that it has actually sparked a curiosity in me about math. Teaching is an art, and you, sir, are an artist.
Man, you are the best. I love your lessons.
Charming presentation. And fun. Thanks from an old engineer. My dad used to joke "You learn something new every day if you're not careful!"
A recreational genius.
i made a model in excel using the formula "=VALUE(CONCAT(SORT(MID(A1,SEQUENCE(LEN(A1)),1),,1)))" and "=VALUE(CONCAT(SORT(MID(A1,SEQUENCE(LEN(A1)),1),,-1)))"i run it from 1000 to 9999 , it was fun to see which numbers to reach 7 times
good sir
I wonder if you can create an X, Y graph of the results that shows the number of steps it takes to get there - perhaps showing points of different colours according to the number of steps to get to 6174 - EG 1 step = red, 2 = orange, 3 yellow etc. I wonder what that would look like?
From one who loves unique math problems, this is instructive and fun. Works with 495,too, just use any 3 digit number.
Thanks for introducing me to something new. I am passing it on. One 7th grade relative likes it and said he’ll show it to his math teacher tomorrow.
I am so excited, it is wonderful. Express how a great mathematician searched and concluded.
Absolutely delighted to find inspiration that, would fuel my liking for numbers.
randomly came across this video n was happy to see another maths teacher with such enthusiasm- the first one was my 5th grade math teacher!! hugs from India!!
just found this young man, very clear explanation! Cool.
Coolest mathematics teacher.... Thank your sir for teaching something new... I belong to the state of kaprekar sir and now i m wondering why this theory was not in our school syllabus... This is the first time i am getting to hear about kaprekar constant...
Thank you sir for teaching something new..
Interesting and unexpected
BTW, you have a very beautiful handwriting and beautiful smile.
I love watching your videos
Making math fun benefits everyone, I love your enthusiasm and really enjoyed learning this today. Thank you!
Learnt something new today. Thanks for the video
I wish you had been my maths teacher ....your enthusiasm would have made the subject I loathed most exciting and interesting.... You are so likeable ....
You don't need to prove it in a sophisticated way: there are just 10000 numbers just test them all. If you design a network of numbers, a graph with arrows (an oriented graph) from each number to the one applying this rule you will get a net where following the arrows you always get there.
*And doesn't work with any numbers: for all numbers that have repeated 4 digits it will after one iteration give 0000* : 1111, 2222, etc. So the graph is not connected: it has two connected parts one that all arrows end in the Kaprekar constant and other where ll arrows end in 0000.
Oh shame. You are a real sourpuss.
I am from India. I am not a big fan of Mathematics. However seeing the video title I got curious. It is simply amazing...
(Because being an Indian whenever we think of Maths we only recollect Ramanujam a great wizard of Mathematics).
Congrats on 200K! 🥳🥳🎉
Thanks man for spreading Kaprekarji's work ✌
I also noticed that in every thing I tried 8532 also appeared is that a thing or am I missing something
Yeah I noticed that as well. Both numbers consist of even and odd numbers in an alternating order. So there should be more such numbers I suppose and not only limited to subtraction. Number patterns are everywhere in nature so this ain't surprising. But still cool as heck.
Perhaps it's a coincidence, especially considering for the first example he introduced it, it wasn't produced like in the second. This would of course require further experimentation and research.
7325 --> 5175 --> 5994 --> 5355 --> 1998 --> 7993 --> 6174
It's important to note that any permutation of the numbers listed above also won't contain 8532 in their sequence. That being said, I just chose a 4-digit number at random and could've gotten lucky, so 8532 could still be common.
4176 too
If 6174 is a terminal node on the process graph, then any nodes that lead to it will show up more often in the process.
Happy to see someone admire the beauty of mathematics. Love from India, brother.
and you reach 495 for 3 digits number
and for all 2 digit numbers except for repeating numbers, the end product will be 9.
6174 and 495 are multiples of nine.
so the sequence of numbers produced are always multiples of nine.
this is an artifact of how our numeric system works - each base has its own Kaprekar numbers and they are all related to the terminating digit of that base.
Curiously, the prime factorization of these three constants result in exactly two 3's, among other primes. Also, this doesn't work for four identical digits.
For any digit? Proof?
All the digits add up to 9.
6174 … 6+1=7 …7+4 = 11 …11+7 = 18 … 1+8= 9
495… 4+5 = 9 … 9+9= 18 …1+8= 9
😎
9 will give you 90-09 = 81, which then gives 81-18 = 63 followed by 63 - 36 = 27.
Now 72-27 = 45 leads us to 54 - 45 = 09 and we're back where we started.
We don't have a "end product", we have a loop.
@@Dalroc same with 6174 innit? as shown in the video
Actually, studying the numbers XY00 with X≥Y (with the help of Excel…), I found that 4100, 5100, 5200, 6100, 8500, 9400, 9500 and 9600 were the numbers of this kind needing 7 steps.
Funny enough, 6200 goes directly to 6174 (in 1 step), and is the only one of the kind.
Thanks for your interesting videos !
I suspect that 6174 is specific to base ten, other bases will likely have other numbers with this property.
I was wondering about this too 😊
Every day I go to school, any thnx, clarity, curiosity & enthusiasm = magic! Great stuff mate! New subscriber!
That’s my PIN code 😮
it will be my passcode.
💀💀💀💀
I need your card number details as well though 🤣🤣🤣
😂
😂
I never heard this number. Thanks for your energetic teachings.
Thank you for teaching us and everythinng you do!
Wow! Loved your neat and beautiful handwriting, use of traditional board and chalk, and of course the way you explained 🙏🏼
Try to draw a directed graph (vertex/edge kind, not the plot) with all 1000 numbers as vertices and arrows pointing to the next vertex. Maybe start with two digit numbers to try the idea out first.
Sir, I love your dramatic pauses, and your smile when teaching the subject. It is so infectious and fun to watch. 👍🏼🙏🏼
I really noticed this 8532 everywhere when trying haha sir you are a legend ✅✅✅✅✅✅✅
I also noticed it. It's different than 6174 in that 8352 leads to 6174 and not the opposite, but still, it's fascinating in almost the same way.
It's simplicity of Vedic Mathematics where one plays with Number...
And becomes Ganitanand or Recreational Mathematician
I'm now curious if this works in other bases as well. I'd imagine it would have to. Might have to test this out.
I never seen a video for maths, but today youtube suggested this video and i watched. its really a mind blowing fact and good to know. thanks to the creator of this video
All the digits add to 9 for 2, 3 and 4 digit numbers.
Even I am learning this for the first time, though I learned maths for 14 yrs....but never learned this in any textbook.....quite interesting.
Wonderful ❤❤
Beautiful!! ❤❤❤Makes me proud as an Indian and I haven't even heard about this!!
18 times (7 cubed) - its being such a cube multiple seems slightly weird in itself.
.... and the sum of the digits is 18, the difference between *these* digits being 7.
Amazing! Thank you for introducing me to this concept. Truly fascinating. I used to hate Maths at school but am absolutely in awe of it now. Thanks for the video and stay happy.
There is a Fibonacci set 2,3, 5 and 8. Wondering if this is another coincidence.
That's interesting 🤔
Every thing is great about you man !
Your explanation , your writing , your conversation , thanks alot sir .
are there analogues of this number for different numbers of digits?
Also in other bases. Is this just a quirk of base 10 ?
Very happy that you made a video on it Kaprekar was a school teacher but his love for mathematics is worth commendable
Wolfam Alpha says it takes at most 8 iterations.
What number did you use? That would be a major breakthrough.
Impossible. Here is a script created in JavaScript that proves that the max amount of iterations is 7.
function kaprekarSteps(t){let e=0;for(;6174!==t;){let r=t.toString().padStart(4,"0");if(e+=1,0===(t=parseInt(r.split("").sort((t,e)=>e-t).join(""))-parseInt(r.split("").sort().join(""))))return 1/0}return e}function generateKaprekarReport(){let t=[];for(let e=0;e"Does not reach 6174"===t.steps?1:"Does not reach 6174"===e.steps?-1:e.steps-t.steps);let e=t.map(t=>`${t.number}: ${t.steps} iterations`).join("
");console.log(e)}generateKaprekarReport();
I wanted to make sure so wrote a program to check every numbers from 0001 to 9998
and there are 2184 numbers which takes 7
but 0 takes 8
I saw that too and I couldn't find a number mentioned; after doing a Google search, i read somewhere that in certain bases (ie 13) it might take 8 iterations; if there is a base 10 number that takes 8 iterations I haven't seen it
with 5 digits this whole process breaks down because it either leads to 0 or apparently one of ten numbers
Not only have you broadened my mind, you have taught me a new way to do 9s.
badhiya bhai
I was positive amused by the constant but even more by your handwriting!
You say you cannot prove it but the domain of the problem is just 4-digit numbers, you can just write a script to exhaust the domain and be done.
i could do it, but i just dont see any point on having it...
@@childrenofkoris I understand that. Proof by exhaustion would give no insight at all as to why this constant exists.
I like these special numbers. At first sight, nothing particular and yet... I should never have found the property of this one
The number 6174 is known as Kaprekar's constant[ 1][ 2][ 3] after the Indian mathematician D. R. Kaprekar. This number is renowned for the following rule: Take any four-digit number, using at least two different digits (leading zeros are allowed).
I am proud to say that legendary Kaprkar sir is from my hometown Nashik, Maharashtra state India
ive got a crazy conspiracy theory what if its all pointing to the tear 6174 💡💡💡💡
I love your big smile that shows how much you enjoy the subject.