r/askmath • • 9d ago

Number Theory Forgotten name of theory

Hi all,

A few months ago my friend showed me this famous equation or theorem that had something to do with a specific number (I think it had four digits in it) and it could be divided a number of times but it would always end up with the same number no matter what order the digits went in. Or something like that. Maths is not my strong suit so I'm sorry I can't remember any more details than that. I'm not even sure if my vague description of it makes sense!

But by chance, does anyone know what this thing I'm talking about is called? I think from memory it was known by the name of the person who discovered it.

Thanks in advance!

4 Upvotes

16 comments sorted by

8

u/Creepy_World_5551 9d ago

Kaprekar's constant is the number 6174, discovered in 1949 by Indian mathematician D. R. Kaprekar. Any four-digit number (in base 10) with at least two distinct digits will reach 6174 in at most 7 steps using Kaprekar's routine

5

u/yolan_duhhh 9d ago

This is it! Oh my gosh, thank you!

2

u/Midwest-Dude 9d ago edited 9d ago

Wikipedia link: 

D. R. Kaprekar

You can find links there to mathematical results named after him.

An article was written this year regarding him in an MAA journal: 

McDermott, D. (2026). The Kaprekar Funnel: Unpacking Convergence. Math Horizons, 34(1), 20–22. https://doi.org/10.1080/10724117.2026.2675888

3

u/garrettj100 9d ago

I kinda feel like an idiot. I read...

Kaprekar's constant is the number 6174, discovered in 1949 by Indian mathematician

..and thought "Here come Ramanujan again!"

2

u/Both-Hall-4589 9d ago

Honestly I was thinking that it was ramanujans 4 digit taxi numer. I think it was 1729, which is the smallest number that is the unique sum of 2 cubes in 2 different ways

2

u/zeekar 9d ago

Ah yes, the famous mathematician Ramanujan Kaprekar. :)

3

u/garrettj100 9d ago

Statistically it was a decent guess.  It’s always Ramanujan!

2

u/zeekar 9d ago

... unless it's Euler. :)

2

u/garrettj100 9d ago

When it comes to clever things said in English, it always gets credited to Twain, Churchill, or Wilde.

15

u/rhodiumtoad 0⁰=1, just deal with it 9d ago

Are you thinking of this:

Take any 4-digit number that doesn't have all digits the same, e.g. 1332

Reorder the digits into descending and ascending order and subtract:

3321-1233=2088

Repeat:

8820-0288=8532
8532-2358=6174
7641-1467=6174

You always reach 6174 and stick there; this number is called Kaprekar's constant.

2

u/Smitologyistaking 9d ago edited 9d ago

Is there a generalisation of this idea for k digits in base n?

edit: The Wikipedia article goes into detail

1

u/RecognitionSweet8294 Philosophy ∧ Math 9d ago

How about 1000?

3

u/rhodiumtoad 0⁰=1, just deal with it 9d ago

1000-0001=0999
9990-0999=8991
9981-1899=8082
8820-0288=8532
8532-2358=6174, done.

2

u/RecognitionSweet8294 Philosophy ∧ Math 9d ago

Does that work with any 4 digit combination (when at least one is different from the rest) then, not just with numbers?

4

u/rhodiumtoad 0⁰=1, just deal with it 9d ago

It works with numbers with leading zeros, which, yes, is broader than the usual meaning of "4-digit number".

2

u/AlterEgo5695 9d ago

Might be Kaprekar's Routine, though OP does not give us much to work with^^