Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

      Popular topics and tags

      Shapes

      • Geometry
      • Vectors and matrices
      • Topology
      • Networks and graph theory
      • Fractals

      Numbers

      • Number theory
      • Arithmetic
      • Prime numbers
      • Fermat's last theorem
      • Cryptography

      Computing and information

      • Quantum computing
      • Complexity
      • Information theory
      • Artificial intelligence and machine learning
      • Algorithm

      Data and probability

      • Statistics
      • Probability and uncertainty
      • Randomness

      Abstract structures

      • Symmetry
      • Algebra and group theory
      • Vectors and matrices

      Physics

      • Fluid dynamics
      • Quantum physics
      • General relativity, gravity and black holes
      • Entropy and thermodynamics
      • String theory and quantum gravity

      Arts, humanities and sport

      • History and philosophy of mathematics
      • Art and Music
      • Language
      • Sport

      Logic, proof and strategy

      • Logic
      • Proof
      • Game theory

      Calculus and analysis

      • Differential equations
      • Calculus

      Towards applications

      • Mathematical modelling
      • Dynamical systems and Chaos

      Applications

      • Medicine and health
      • Epidemiology
      • Biology
      • Economics and finance
      • Engineering and architecture
      • Weather forecasting
      • Climate change

      Understanding of mathematics

      • Public understanding of mathematics
      • Education

      Get your maths quickly

      • Maths in a minute

      Main menu

    • Home
    • Articles
    • Collections
    • Podcasts
    • Maths in a minute
    • Puzzles
    • Videos
    • Topics and tags
    • Audiences

      • cat icon
        Curiosity
      • newspaper icon
        Media
      • graduation icon
        Education
      • briefcase icon
        Policy

      Secondary menu

    • My list
    • About Plus
    • Sponsors
    • Subscribe
    • Contact Us
    • Log in
    • Mysterious 6174

      17 May, 2019
      10 comments

      I want to let you in on one of our favourite mathematical mysteries... To get started, choose a four digit number where the digits are not all the same (that is not 1111, 2222,...). Then rearrange the digits to get the largest and smallest numbers these digits can make. Finally, subtract the smallest number from the largest to get a new number, and carry on repeating the operation for each new number.

      We'll show you what we mean with the number 2005. The maximum number we can make with these digits is 5200, and the minimum is 0025 or 25 (if one or more of the digits is zero, embed these in the left hand side of the minimum number). The subtractions are:

      5200 - 0025 = 5175
      7551 - 1557 = 5994
      9954 - 4599 = 5355
      5553 - 3555 = 1998
      9981 - 1899 = 8082
      8820 - 0288 = 8532
      8532 - 2358 = 6174
      7641 - 1467 = 6174

      When we reach 6174 the process repeats itself, returning 6174 every time.

      6174

      Now try with your four digit number... what do you get? I bet you'll get to 6174, every time, no matter what number you chose! Try a few more and see if you believe me!

      Do you think we always reach the mysterious number 6174? If we do, why do you think that happens? If this mystery piques your interest, then you can find out why in this excellent article by Yutaka Nishiyama. This question has been intriguing Plus readers for years, and Yutaka's article remains one of our most popular articles, generating reams of comments, emails and discussions. And spoiler alert - 6174 isn't the only number with these special numbers - but you'll have to try the same process with three digit numbers, or read the article, to find out!

      • Log in or register to post comments

      Comments

      Aziz Inan

      29 May 2019

      Permalink

      This is very interesting, thanks for posting it!

      I understand that the digits of the four-digit number chosen should not be all equal (AAAA) for this process to work but are there other four-digit number exceptions that won't yield 6174 through this process? For example, what about number 1000?

      Thanks again,

      Aziz Inan

      • Log in or register to post comments

      Aziz Inan

      29 May 2019

      Permalink

      I now realize that I must always keep the result of each subtraction as a four-digit number. The trap I fell into was 1000 - 0001 = 999 instead of 0999. :-(

      Thanks again!

      Aziz Inan

      • Log in or register to post comments

      Pawan Kumar B.K.

      14 June 2019

      Permalink

      I tried with 2035. I found true. Amazing!

      • Log in or register to post comments

      Anonymous

      7 November 2019

      In reply to Mathematics by Pawan Kumar B.K.

      Permalink

      yes 2035

      • Log in or register to post comments

      Maglin Shelcia

      18 June 2019

      Permalink

      Yeah! It's really amazing. I too tried it with 1704.
      7410-0147 = 7263
      7632-2367 = 5265
      6552-2556 = 3996
      9963-3699 = 6264
      6642-2466 = 4176
      7641-1467 = 6174

      • Log in or register to post comments

      Somebody

      9 January 2024

      In reply to Mysterious 6174 by Maglin Shelcia

      Permalink

      I'm amazed! It's so amazing!

      • Log in or register to post comments

      ubatdongsan

      14 August 2019

      Permalink

      Do you think we always reach the mysterious number 6174? If we do, why do you think that happens
      ________________

      https://ubatdongsan.vn

      • Log in or register to post comments

      Rinaldi

      19 September 2019

      Permalink

      I've followed the same approach with two and three digit numbers. Here are some interesting observations after a few iterations:

      * three digit numbers
      is 495 the magic number for three digit numbers?
      example 1 example 2
      100 - 001 = 099 920 - 029 = 891
      990 - 99 = 891 981 - 189 = 792 (eventually 495)
      981 - 189 = 792
      972 - 279 = 693
      963 - 369 = 594
      954 - 459 = 495
      954 - 459 = 495

      * Two digit numbers
      For two digits the process does not "converge" to an exact result or mysterious number instead you may get caught up in a loop:
      i(1) 84 - 48 = 36
      (2) 63 - 36 = 27
      (3) 72 - 27 = 45
      (4) 54 - 45 = 09
      (5) 90 - 09 = 81
      (6) 81 - 18 = 63 this is the largest digit from the result of iteration (1).

      Example 2:
      91-19 = 72 ( largest from iteration 2 from example 1)
      72 - 27 = 45
      54 - 45 = 09
      90 - 09 = 81
      81 - 18 = 63

      what about 5,6, ..., n digit numbers? Is there a way to find all the "mysterious numbers"?

      • Log in or register to post comments

      Stargazer

      23 February 2022

      Permalink

      If you want to try it the easy way you can choose the actual magical number 6174, it renders down to only one subtraction:

      6174 =>
      7641-1467 = 6174

      • Log in or register to post comments

      Snowflake

      10 September 2024

      Permalink

      This was weird and hard to figure out!

      • Log in or register to post comments
      University of Cambridge logo

      Plus Magazine is part of the family of activities in the Millennium Mathematics Project.
      Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

      Terms