D. R. Kaprekar
D. R. Kaprekar
Born
Dattatreya Ramchandra Kaprekar

(1905-01-17)17 January 1905
Died1986 (aged 81)
Devlali, Maharashtra, India
OccupationSchool teacher
Known forContributions to recreational mathematics

Dattatreya Ramchandra Kaprekar (Marathi: दत्तात्रेय रामचंद्र कापरेकर; 17 January 1905 – 1986) was an Indian recreational mathematician who described several classes of natural numbers including the Kaprekar, harshad and self numbers and discovered the Kaprekar's constant, named after him. Despite having no formal postgraduate training and working as a schoolteacher, he published extensively and became well known in recreational mathematics circles.[1]

Biography

Kaprekar received his secondary school education in Thane and studied at Cotton College in Guwahati. In 1927, he won the Wrangler R. P. Paranjpye Mathematical Prize for an original piece of work in mathematics.[2]

He attended the University of Mumbai, receiving his bachelor's degree in 1929. Having never received any formal postgraduate training, for his entire career (1930–1962) he was a schoolteacher at the government junior school in Devlali Maharashtra, India. Cycling from place to place he also tutored private students with unconventional methods, cheerfully sitting by a river and "thinking of theorems". He published extensively, writing about such topics as recurring decimals, magic squares, and integers with special properties. He is also known as "Ganitanand".

Discoveries

Working largely alone, Kaprekar discovered a number of results in number theory and described various properties of numbers.[3] In addition to the Kaprekar's constant and the Kaprekar numbers which were named after him, he also described self numbers or Devlali numbers, the harshad numbers and Demlo numbers. He also constructed certain types of magic squares related to the Copernicus magic square.[4] Initially his ideas were not taken seriously by Indian mathematicians, and his results were published largely in low-level mathematics journals or privately published, but international fame arrived when Martin Gardner wrote about Kaprekar in his March 1975 column of Mathematical Games for Scientific American. Today his name is well-known and many other mathematicians have pursued the study of the properties he discovered.[1]

Kaprekar's constant

In 1949, Kaprekar discovered an interesting property of the number 6174, which was subsequently named the Kaprekar constant.[5] He showed that 6174 is reached in the end as one repeatedly subtracts the highest and lowest numbers that can be constructed from a set of four digits that are not all identical. Thus, starting with 1234, we have:

4321 − 1234 = 3087, then
8730 − 0378 = 8352, and
8532 − 2358 = 6174.

Repeating from this point onward leaves the same number (7641 − 1467 = 6174). In general, when the operation converges it does so in at most seven iterations.

A similar constant for 3 digits is 495.[6] However, in base 10 a single such constant only exists for numbers of 3 or 4 digits; for other digit lengths or bases other than 10, the Kaprekar's routine algorithm described above may in general terminate in multiple different constants or repeated cycles, depending on the starting value.[7]

Python Code

Python Code to test kaprekar's constant:

KAPREKAR_CONSTANT = 6174
print("Enter the number as 0 to stop")
while True:
  n = input("Enter a four digit number: ")
  if not n.isdigit() or len(n) != 4:
     print("Enter a valid four digit integer\n")
     continue
  else:
     n = int(n)
  if n == 0:
      break
  print(f'n = {n}')
  while True:   
      digits = []
      for i in range(4):
        digits.append(n % 10)
        n //= 10
      digits.sort(reverse=True)    
      large = 0
      for d in digits:
          large = large * 10 + d
      digits.sort()
      small = 0
      for d in digits:
          small = small * 10 + d
      n = large - small
      print(f'{large:>4} - {small:>4} = {n:>4}')
      if n == KAPREKAR_CONSTANT:
          break
  print()

Kaprekar number

Another class of numbers Kaprekar described are Kaprekar numbers.[8] A Kaprekar number is a positive integer with the property that if it is squared, then its representation can be partitioned into two positive integer parts whose sum is equal to the original number (e.g. 45, since 452=2025, and 20+25=45, also 9, 55, 99 etc.) However, note the restriction that the two numbers are positive; for example, 100 is not a Kaprekar number even though 1002=10000, and 100+00 = 100. This operation, of taking the rightmost digits of a square, and adding it to the integer formed by the leftmost digits, is known as the Kaprekar operation.

Some examples of Kaprekar numbers in base 10, besides the numbers 9, 99, 999, ..., are (sequence A006886 in the OEIS):

NumberSquareDecomposition
703703² = 494209494+209 = 703
27282728² = 7441984744+1984 = 2728

Devlali or self number

In 1963, Kaprekar defined the property which has come to be known as self numbers,[9] as the integers that cannot be generated by taking some other number and adding its own digits to it. For example, 21 is not a self number, since it can be generated from 15: 15 + 1 + 5 = 21. But 20 is a self number, since it cannot be generated from any other integer. He also gave a test for verifying this property in any number. These are sometimes referred to as Devlali numbers (after the town where he lived); though this appears to have been his preferred designation,[9] the term "self number" is more widespread. Sometimes these are also designated Colombian numbers after a later designation.

Harshad number

Kaprekar also described the harshad numbers which he named harshad, meaning "giving joy" (Sanskrit harsha, joy +da taddhita pratyaya, causative); these are defined by the property that they are divisible by the sum of their digits. Thus 12, which is divisible by 1 + 2 = 3, is a harshad number. These were later also called Niven numbers after 1977 lecture on these by the Canadian mathematician Ivan M. Niven. Numbers which are harshad in all bases (only 1, 2, 4, and 6) are called all-harshad numbers. Much work has been done on harshad numbers, and their distribution, frequency, etc. are a matter of considerable interest in number theory today.

Demlo number

Kaprekar also studied the Demlo numbers,[10] name of which was derived from the name of a train station Demlo (now called Dombivili) 30 miles from Bombay on the then G. I. P. Railway where he had the idea of studying them.[1] The best known of these are the Wonderful Demlo numbers 1, 121, 12321, 1234321, ..., which are the squares of the repunits 1, 11, 111,1111, ....[11]

See also

References

  1. 1 2 3 O'Connor, John J.; Robertson, Edmund F., "D. R. Kaprekar", MacTutor History of Mathematics Archive, University of St Andrews
  2. Dilip M. Salwi (24 January 2005). "Dattaraya Ramchandra Kaprekar". Archived from the original on 16 November 2007. Retrieved 30 November 2007.
  3. Athmaraman, R. (2004). The Wonder World of Kaprekar Numbers. Chennai (India): The Association of Mathematics Teachers of India.
  4. Kaprekar, D. R. (1974). "The Copernicus Magic Square". Indian Journal of History of Science. 9 (1).
  5. Kaprekar, D. R. (1949). "Another Solitaire Game". Scripta Mathematica. 15: 244–245.
  6. An informal proof of the property for three digits
  7. "Mysterious number 6174" in Plus Magazine
  8. Weisstein, Eric W. "Kaprekar Number". MathWorld.
  9. 1 2 Kaprekar, D. R. The Mathematics of New Self-Numbers Devalali (1963)nn: 19–20
  10. Gunjikar, K. R.; Kaprekar, D. R. (1939). "Theory of Demlo numbers" (PDF). J. Univ. Bombay. VIII (3): 3–9.
  11. Weisstein, Eric W. "Demlo Number". MathWorld.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.