In search of Kaprekar’s Constant

Translators

I got an extra period in class today. It was towards the end of the day, so I decided not to continue the regular classroom discussion. I was searching through the book “Apne Haath Ganit” for a one-period activity that would engage the children. I came across a topic called “Kaprekar’s constant.” From the name, it sounded like a high school topic, but I verified the Kaprekar constant routine with a few numbers, and it worked! This part was actually simple enough to design an exploration for Class 3 students, which is what I was looking for.

Prerequisites

  • They should know how to add and subtract 3-digit numbers.
  • They should know how to arrange the digits of a number in ascending and descending order.

Classroom Discussion

As I entered the class, the students were drained after a full day of study and wanted some playtime or a computer class during this extra period. Amid the chaos, I ignored their requests and started writing “Kaprekar’s constant” on the board. The children began pronouncing it and asking what it was.

Suyash Tiwari

I said, “Let’s first sit quietly for two minutes, and then I will tell you about it.”
Everyone settled down, and I began: “As a person who does great work in science is called a scientist, what do we call a person who does great work in Mathematics?”

Students started guessing – “Matheist,” “Mathintist,” and other difficult-to-spell words.

Students

I replied, “We call them mathematicians, and today we are going to talk about a great mathematician from India-Kaprekar ji-and his magical constant number.”

D.R. Kaprekar was a mathematics teacher in a government school in Devlali, Maharashtra. He liked playing with numbers very much and found many beautiful patterns in numbers that were previously unknown.
(Source: NCERľ Ganit Prakash Class-6)

Everyone murmured, “What is the magical constant number?”
I continued, “Let’s do the same work Kaprekar ji did. Take out your notebooks, and together we will find the magical constant number.”
They all eagerly followed, taking their “swords”-their pens-in hand.
“You are all used to 3-digit numbers. But today, let’s start with any 4-digit number. Yes, Maira, tell me a 4-digit number, in which all four digits are not the same.”

“1762.”

Maira

Good, here all the digits are different. Now I will tell you what to do and you all write down your answers in your notebooks.

Start with the 4-digit number 1 7 6 2
Arrange the digits in descending order.
This is the first number.
7 6 2 1
Now arrange the same digits in ascending order. This is the second number. 1 2 6 7
Find the difference between the first and second numbers. 6 3 5 4
Repeat the process with the new number.
Descending 6 5 4 3
Ascending 3 4 5 6
Difference 3 0 8 7
Descending 8 7 3 0
Ascending 0 3 7 8
Difference 8 3 5 2
Descending 8 5 3 2
Ascending 2 3 5 8
Difference 6 1 7 4
Table 1: The repeated sequence of operations to arrive at Kaprekar’s constant

“Let’s try doing the steps once more—what do you notice?”

We will get 6174 again sir!” they responded.

Will you get 6174 again if the difference was 4716?

“Yes, because the same digits are there: 7, 6, 4, and 1; so we are finding the difference between the same numbers.”

“Ok, great!”
“Now, try the same process with another 4-digit number. Let’s check whether we arrive at a similar situation. This time, each one of you take your own number and follow the process.”

Within a minute, everyone was working like little mathematicians—following the routine of descending order, ascending order, and subtraction. After ten to fifteen minutes, many students came up excitedly:

“We got the same number 6174 again!”

“Yes, you all must have got the same number. We call it Kaprekar’s constant—6174. We call it constant because it does not change.”

By then, the period was over.

I gave them two numbers to try at home. For some advanced students, I added a challenge: “Is there any similar constant for 3-digit or 5-digit numbers? If you find one, we will name it after you.”

The Next Day

“I found the 3-digit constant—495!”

“I also found it!”

I was not expecting this level of exploration from Class 3 students. Tripti, Maira and Jigyanshu found the 3-digit number. They independently followed the routine on multiple numbers and found the constant. Even I was not aware of the 3-digit constant. I appreciated their work.

“But I couldn’t find a 5-digit constant. It does not stop at a single number, but I did see that the same set of numbers repeat.”

Jigyanshu

I saw the problem and tried it for myself. Yes, it was not a single number but a set of numbers start appearing in cycles after a few steps. We decided to do further work on this. We found on the internet that for 2-digit and 5-digit there is no fixed number but that there are certain fixed cycles. I told Jigyanshu to work on 2-digit numbers and I myself took 5-digit numbers.

Following were the observations of Jigyanshu for 2-digit number:

Figure 1: Jigyanshu’s work

When I started working on 5-digit numbers, I found an outcome similar to Jigyanshu’s observation. After two to five steps, the number starts to fall inside a cycle. But here, there was more than one type of cycle. I used a program to try it on about 25 different 5-digit numbers and found that all the numbers I tried would end in one of the following three cycles.

Figure 2: Three cycles of 5-digit Kaprekar sequence

Key findings

  • Like Kaprekar’s constant 6174 for 4-digit numbers, 3-digit numbers arrive at a constant 495 when subjected to the same process.
  • For 2-digit and 5-digit numbers the process ends in a cycle, not a single constant.
  • All the numbers (constants or in the cycle) are divisible by 9.
  • Both the constants and the repeating cycles were arrived at in a maximum of 7 steps.
  • The starting number should have at least two different digits. (For a number such as 3222, the first difference is a 3-digit number 999, but on taking this number as 0999, we could arrive at the Kaprekar’s constant at the fourth step.)
Cycle of 2-digit Kaprekar sequence

Takeaways for teachers

  • Increasing love for numbers – Generally, students don’t ask for more numerical problems but, in this class, the students were asking – “Give us another number, we will find the constant.” I was able to get them to practise the new skill of subtraction of 4-digit numbers with regrouping without any external persuasion.
  • Developing persistence and problem-solving skills – Students find repetitive work boring, but they all persistently solved and found the constant. Some students had to go for 7 steps to find the constant, which is challenging for Class 3 students.
  • Introducing mathematicians- not theory but practical – Starting with the new word ‘mathematician’, they got to know details of Kaprekar’s life – a simple rural teacher who persisted in his explorations for the sheer love of mathematics. I decided not to tell them directly about Ramanujan, but to start with Srinivasa Ramanujan’s famous magic squares.
  • Confident learning by doing – After one day, I asked – “Who can come up and talk about Kaprekar constant?” Many hands were raised as they had practised it on their own and were confident that they could explain the process. Also, I gave interested students a chance to explore other constant numbers on their own.

Editor's Note

What started as a simple search for an activity to keep students engaged during a free period, developed into a learning experience for both students and teacher. This teacher became an explorer along with his students and was able to challenge students with different abilities to push their limits and learn from each other. Truly a valuable use of free time!

More Articles