Author: Alley · Updated: 1 Nov 2026 · Sources & corrections
At a glance
This lesson follows a school teacher whose number trick became famous.
- He taught maths at one school in Devlali from 1929 to 1962.
- He also studied Kaprekar, self, Demlo and Harshad numbers.
- Many Indian mathematicians ignored his work in his lifetime.
Source: MacTutor, Kaprekar biography.
Source: ThatsMaths, Kaprekar number.
Pick almost any four-digit number and a school teacher’s trick will lead it to 6174. The teacher was Kaprekar. He taught in a small Indian town and worked largely on his own. This lesson follows his life, his best-known number, his other ideas and his late fame.
Contents
Who was D.R. Kaprekar, and how did he begin?
Dattatreya Ramchandra Kaprekar was born in 1905 and died in 1986. He was a mathematician who worked mostly alone, on number puzzles.
1. Where was he born, and what shaped his love of numbers?
Kaprekar was born on 17 January 1905 in Dahanu. Dahanu is a town on India’s west coast, about 100 km north of Mumbai. His mother died when he was eight. His father, a clerk, raised him.
His father was fascinated by astrology. Astrology needs no deep mathematics, but it needs skill with numbers. That skill passed to the son. Kaprekar went to secondary school in Thane and spent many happy hours on puzzles.

2. Where did he study, and what prize did he win?
Kaprekar began college in 1923 at Fergusson College in Pune. In 1927 he won the Wrangler R P Paranjpe Mathematical Prize. A wrangler is a student who earns top honours in mathematics. The prize went to the best original maths by a student.
He finished a BSc degree in 1929. MacTutor calls him largely self-taught in number theory.

3. What was his job, and what kind of teacher was he?
In 1929 Kaprekar became a school mathematics teacher in Devlali. Devlali is a town very close to Nashik. He taught there for his whole career and retired in 1962, at the age of 58.
Colleagues called him a good teacher. He used his love of numbers to motivate pupils. Local colleges often asked him to speak about his unusual methods.
He once said that he was addicted to numbers. In his words, a drunkard wants to keep drinking wine, and the same is true for him with numbers.

What is 6174, and why is it special?
The number 6174 is called Kaprekar’s constant. It comes from a simple routine that any school pupil can try.
4. How does the Kaprekar routine work?
Start with any four-digit number whose digits are not all the same. Arrange its digits to make the largest number and the smallest number. Subtract the smaller from the larger. Repeat the steps with the answer.
Try 1234. First, 4321 minus 1234 is 3087. Next, 8730 minus 0378 is 8352. Then 8532 minus 2358 is 6174.
Another start is 3743. It takes seven steps and ends at 6174 too. That is the longest the routine can run.
5. Why does the routine stop at 6174?
Take 6174 and run the routine. The largest number is 7641 and the smallest is 1467. Their difference is 6174 again. So the routine stays there. A number that stays put like this is called a fixed point.
Applying the routine to almost any four-digit number reaches 6174 in at most seven steps. The exceptions are numbers with four equal digits, such as 1111. A number like that is called a repdigit. It gives 0 at once.
6. When did he find it, and when did he share it?
Kaprekar first found the property in 1946. He announced it at the Madras Mathematical Conference in 1949. He then wrote about it in the journal Scripta Mathematica.
MacTutor gives 1953 for that paper. Some other lists cite a 1955 paper with a different title. So do not memorise the printing year. Remember 1946 for the find and 1949 for the first public talk.
7. Do other digit lengths work in the same way?
Yes, but the result changes with the length. Three-digit numbers, other than repdigits, reach the fixed point 495. They do so in at most six steps.
Two-digit numbers with different digits fall into a loop instead. The loop is 09, 81, 63, 27, 45, and then it repeats. So only the four-digit case has the famous single end point, 6174.
What other number ideas did he invent?
Kaprekar named and studied many kinds of numbers. Four of them are still discussed today.
8. What is a Kaprekar number?
A Kaprekar number is a number whose square can be split into two parts. The two parts add up to the number itself.
Take 703. Its square is 494209. Split that into 494 and 209, and the sum is 703. The parts may start with zeros. For 9999, the square is 99980001. The parts 9998 and 0001 add up to 9999.
The numbers 9, 99, 999 and so on all work. So there are infinitely many Kaprekar numbers. The first few are 1, 9, 45, 55, 99, 297 and 703.
9. What is a self number?
Kaprekar called these numbers self numbers, or Swayambhu. Start with a number and add its digits to it. Do this again and again. For 23, the steps give 28, 38, 49, 62 and 70.
Some numbers can be made this way from a smaller number. Take 29. It comes from 19, which comes from 14, which comes from 7. But nothing makes 7. So 7 is a self number. The first few are 1, 3, 5, 7, 9, 20 and 31.
10. What are Demlo and Harshad numbers?
Demlo numbers are named after a railway station on the Bombay to Thane line. Kaprekar was changing trains there in 1923 when the idea came to him.
Harshad numbers are numbers divisible by the sum of their own digits. The name comes from a Sanskrit word for great joy. Examples are 12, 18, 20 and 21. For 12, the digits add to 3, and 3 divides 12.
Why did fame come so late?
Kaprekar had little support at home. The wider world noticed him only many years later.
11. How did other mathematicians treat his work?
Many Indian mathematicians laughed at his ideas. They thought the ideas were trivial and unimportant. He did print some papers in low-level journals.
Other papers he published himself. They were pamphlets marked with lines such as Privately printed, Devlali. Even so, many of his papers were reviewed in Mathematical Reviews, a journal that lists new maths papers.
12. What brought him world fame?
International fame came in 1975. The American writer Martin Gardner wrote about Kaprekar and his numbers in his Mathematical Games column. The column ran in the March issue of Scientific American.
By then Kaprekar was 70 years old and long retired. Gardner’s article took the 6174 trick to readers around the world.
Source: MacTutor, Kaprekar biography, item 12
Source: BBC via 021, 6174, item 12
13. How did he live in his last years?
His wife died in 1966. After that his pension was too small to live on. He lived in the cheapest way he could and spent his waking hours on numbers.
To earn enough, he gave private tuition in mathematics and science. He died in 1986 at Devlali, the town where he had taught.
How do exams test Kaprekar?
Questions on him test names, numbers and years. Learn the pairs below.
14. Which pairs and traps should you remember?
Match each name to its idea. Kaprekar’s constant is 6174, reached within seven steps. A Kaprekar number is a different idea: its square splits into parts that add back to it.
Keep four ideas apart: Kaprekar numbers, self numbers, Demlo numbers and Harshad numbers. Each has its own rule.
Remember 1946 for the find, 1949 for the talk and 1975 for the fame.
Four questions to think through
What does fixed point mean here?
A fixed point is a number the routine leaves unchanged. For 6174, the largest and smallest rearrangements are 7641 and 1467. Their difference is 6174 again. So the routine stays there.
Why does 8730 minus 0378 keep a zero in front?
Every number in the routine keeps four digits. So a zero in front stays. It is part of the number. The step 8730 minus 0378 gives 8352.
Why were his pamphlets still found later?
He printed many papers himself. They carried lines such as Privately printed, Devlali. Many of his papers were still reviewed in Mathematical Reviews. So other mathematicians could find them.
How do you check a Harshad number?
Add the digits, then see if that sum divides the number. Take 18. The digits add to 9, and 9 divides 18. So 18 is a Harshad number.
Check your understanding
This score resets when the page reloads.
✅ Test Yourself
Try practice questions on Kaprekar, his constant and his number ideas.
0 of 8 answered
Question 1 of 8
Question 2 of 8
Question 3 of 8
Question 4 of 8
Question 5 of 8
Question 6 of 8
Question 7 of 8
Question 8 of 8
Share your thoughts