4-digit trick, predicting a final number

  • Context: High School 
  • Thread starter Thread starter checkitagain
  • Start date Start date
  • Tags Tags
    Final
Click For Summary

Discussion Overview

The discussion revolves around a numerical trick involving 4-digit numbers, where participants explore the process of repeatedly forming the largest and smallest numbers from a chosen set of digits, subtracting them, and observing the resulting fixed point, which is claimed to be 6174. The conversation includes examples, corrections, and inquiries into the behavior of this process, as well as comparisons to other mathematical conjectures.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants describe the process of selecting 4 digits, forming the largest and smallest numbers, and performing the subtraction to reach a final number.
  • Others question the validity of the example provided, suggesting that certain sequences fall into loops rather than reaching a fixed point.
  • A participant presents data on the number of cases that end in specific loops, indicating that not all sequences converge to 6174.
  • Corrections are made regarding the method of sorting digits before subtraction, emphasizing that digits must be arranged in nonincreasing and nondecreasing order.
  • Some participants express curiosity about the time it takes to reach the fixed number and present statistics on the number of steps required for various cases.
  • There is speculation about whether similar processes with 5 or 6 digits yield the same fixed points, with some participants asserting that they do not.
  • Comparisons are drawn between this problem and the 3n+1 conjecture, suggesting a similarity in the complexity of proving outcomes.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the behavior of the process for all digit selections, with multiple competing views on whether it always leads to 6174 or falls into loops. The discussion remains unresolved regarding the generalization of the process to numbers with more than 4 digits.

Contextual Notes

Some participants note that the process may depend on specific properties of the digits chosen, and there are unresolved questions about the implications of the results for different numbers of digits.

Who May Find This Useful

This discussion may be of interest to those exploring numerical patterns, mathematical curiosities, or the behavior of iterative processes in number theory.

checkitagain
Messages
137
Reaction score
1
Ask someone to pick 4 digits, but not all of them be the same.

Zeroes are allowed as digits

Form the largest number possible and the smallest number
possible, including annexing any 0-digits to the left,
Subtract the smaller number from the larger number,
Write the difference as a 4-digit number, with any zeroes
written on the left as part of the difference. Then,
again, form the largest number and the smallest numbers
possible, respectively, and subtract them. Repeat the
process as above.

Keep repeating this process until the resulting number
doesn't change anymore.



Then tell the person that their final number they end up

with is 6174.


Example:

The person chooses 0, 0, 0, and 1.


1000
-0001
------
0999


Then:

9990
-0999
------
8991



And then the person who chose the digits would continue
in this manner until one unchanging number is reached...
 
Last edited:
Mathematics news on Phys.org
checkitagain said:
until one unchanging number is reached...

Is it?
The very example you give of 999 seems to fall into a loop:

9990 - 0999 = 8991
8991 - 1998 = 6993
6993 - 3996 = 2997
7992 - 2997 = 4995
5994 - 4995 = 999
9990 - 0999 = 8991
...

Edit: quick computer search on all 4-digit numbers (in this case, including numbers with all digits the same, palindromes, etc. - all numbers from 0000 to 9999):

206 cases end with the loop ['0000']
704 cases end with the loop ['8712', '6534']
1594 cases end with the loop ['9090', '8181', '6363', '7272', '5454']
3748 cases end with the loop ['0900', '0810', '0630', '0720', '0540']
3748 cases end with the loop ['9990', '8991', '6993', '7992', '5994']
 
Last edited:
Dodo said:
Is it?
The very example you give of 999 seems to fall into a loop:

9990 - 0999 = 8991

8991 - 1998 = 6993 . . . . . This should be 9981 - 1899, and the other corrections
would be similar to this.


6993 - 3996 = 2997

7992 - 2997 = 4995

5994 - 4995 = 999

9990 - 0999 = 8991
...

checkitagain said:
Form the largest number possible and the smallest number
possible, including annexing any 0-digits to the left,...


No, for each subtraction, the first number must be composed
of nonincreasing digits and the second number must be composed
of nondecreasing digits.
 
Last edited:
Ahhh, sorry. So you sort the digits down, then up, and subtract.

I repeated the experiment, this time obtaining:
10 cases end with the loop ['0000'] (presumably, the all-digits-equal cases)
9990 cases end with the loop ['7641']

I was curious about how long it takes to reach the fixed number, and got this, for the above 9990 cases:
24 cases took 0 steps (presumably, the 4! permutations of '6174')
648 cases took 1 step
1008 cases took 2 steps
2184 cases took 3 steps
1152 cases took 4 steps
1830 cases took 5 steps
2064 cases took 6 steps
1080 cases took 7 steps

But the question, of course, is *why* does it always end with 6174.

Edit: removed comment about no other permutation of 6174 being reached first. Program bug, sorry.

Edit 2: Hand-made diagram (hopefully correct) of the sorted differences.
Edit 3: Working with 3 digits only, the situation is far more simple.
 
Last edited:
Dodo said:
Ahhh, sorry. So you sort the digits down, then up, and subtract.

I repeated the experiment, this time obtaining:
10 cases end with the loop ['0000'] (presumably, the all-digits-equal cases)
9990 cases end with the loop ['7641']

I was curious about how long it takes to reach the fixed number, and got this, for the above 9990 cases:
24 cases took 0 steps (presumably, the 4! permutations of '6174')
648 cases took 1 step
1008 cases took 2 steps
2184 cases took 3 steps
1152 cases took 4 steps
1830 cases took 5 steps
2064 cases took 6 steps
1080 cases took 7 steps

But the question, of course, is *why* does it always end with 6174.

Edit: removed comment about no other permutation of 6174 being reached first. Program bug, sorry.

Edit 2: Hand-made diagram (hopefully correct) of the sorted differences.
Edit 3: Working with 3 digits only, the situation is far more simple.


Nice Dodo!

Could you perhaps do the same with 5 digits and 6 digits and see if they also end in the same number??
 
If I'm not mistaken, they don't. Pity that there is not a general rule to be found.

With 5 digits, you can end up with 99954, 98622, 98532, 97731, 97641, 97533, 97443, 96642, 96543 or 95553 (or 00000).

With 6 digits, you end on 995544, 886320, 876420, 875430, 875421, 866322, 885420, 766431 or 665442 (or 000000).

With an odd number of digits, I guess you are bound to end always on a number containing a 9, because the middle digit is the same when sorting up or down...

With 2 digits the situation is easier to understand. The difference of a number minus its reverse is a multiple of 9, and there are only so many possibilities; they happen to lie in a circle, 90 -> 81 -> 63 -> 72 -> 54 -> 90.
 
Here is a nice graph:

770px-KaprekarRoutineFlowGraph6174.svg.png


More information at: http://en.wikipedia.org/wiki/6174_(number)
 
Ah, nice, Micromass, thanks for the reference (:shame: I forgot to look up Wikipedia).

This problem sounds like a remote cousin of the 3n+1 conjecture, doesn't it? (BTW, I don't have at hand Guy's "Unsolved problems", but I wonder if someone can check if Kaprekar's process is mentioned there, and related to something else. Or maybe is not as much "unsolved" as to merit being there.)
 
Dodo said:
Ah, nice, Micromass, thanks for the reference (:shame: I forgot to look up Wikipedia).

This problem sounds like a remote cousin of the 3n+1 conjecture, doesn't it?

It sure does. The level of difficulties involved to prove something meaningful seems the same.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 43 ·
2
Replies
43
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K