Skip to main content
The National Cipher Challenge

Reply To: Puzzles

A Tale of 2 Secrets Forums T.E.M.P.E.S.T. Puzzles Reply To: Puzzles

#111985
ByteInBits
Participant

@F6EXB_the_frenchy Your answer is of course correct.

That is amazingly well done assuming you had no online help!
As you have given the workings that brings it to an end.

Thanks for your participation 🙂

RATS INFORMATIONAL
==================
The RATS sequence, named after mathematician John Horton Conway’s acronym
for “Reverse, Add, Then Sort,” is a divergent sequence of positive integers
in base 10, generated iteratively from an initial number (typically starting
with 1). It is conjectured that, regardless of the starting positive integer,
the process either enters this specific divergent sequence or converges to a
finite cycle.

### Iterative Generation Process
Given the current term a_n (a positive integer with no zero digits, sorted
in non-decreasing order):

1. Compute the reverse of a_n, denoted rev(a_n).
2. Add them: s = a_n + rev(a_n).
3. Remove all zero digits from s.
4. Sort the remaining digits in non-decreasing order to obtain a_{n+1}.

This yields the sequence OEIS A004000:
1, 2, 4, 8, 16, 77, 145, 668, 1345, 6677, 13444, 55778, 133345,
666677, 1333444, 5567777, 12333445, 66666677, 133333444, 556667777, …

### Example Iteration
Starting from 668:
– Reverse: 866
– Sum: 668 + 866 = 1534
– Remove zeros: 1534 (none present)
– Sort digits: 1345

Thus, the next term is 1345.

The sequence grows indefinitely, with each term adding roughly one more
digit, alternating patterns of increasing 1s/2s/3s and 5s/6s/7s/8s/9s.
No closed-form formula exists for the n-th term, as it is defined
purely by this recursive digit-manipulation rule.

============================================= Prove RATS conjecture

The RATS conjecture posits that for any positive integer with no zero digits,
the RATS sequence—generated by reversing the digits, adding the number to its
reverse, removing zeros, and sorting the digits in non-decreasing order—either
enters the divergent sequence (1, 2, 4, 8, 16, 77, 145, 668, 1345, 6677, …)
or converges to a finite cycle. As of October 23, 2025, the conjecture remains
unproven, with no complete proof or counterexample identified in mathematical
literature. Below, I outline the challenges, known results, and approaches to
tackling the conjecture, rather than a definitive proof, since none exists.

### Understanding the RATS Sequence
The RATS sequence (OEIS A004000) is defined iteratively:
1. Start with a positive integer a_n (no zero digits, digits in
non-decreasing order).
2. Compute its reverse rev}(a_n).
3. Add: s = a_n + rev}(a_n).
4. Remove all zero digits from s.
5. Sort the resulting digits in non-decreasing order to get a_{n+1}.

For example, starting with 1:
– 1 \to rev}(1) = 1 \to 1 + 1 = 2 \to 2 (no zeros, sorted).
– 2 \to rev}(2) = 2 \to 2 + 2 = 4 \to 4.
– 16 \to rev}(16) = 61 \to 16 + 61 = 77 \to 77.
– 77 \to rev}(77) = 77 \to 77 + 77 = 154 \to 145.

The sequence 1, 2, 4, 8, 16, 77, 145, 668, 1345, … appears to diverge, with
terms roughly doubling in digit length periodically.

### Known Results
Computational evidence suggests that most starting numbers either:
– Join the divergent sequence (e.g., starting at 1, 3, 5, 9, …).
– Enter a finite cycle, e.g., 89 ? 88 (cycle of length 1),
or 1189 ? 112 ? 224 ? 448 ? 899 ? 889 ? 888 ? 1189 (cycle of length 7).

Key observations:
– **Divergent Sequence**: The sequence starting from 1 grows indefinitely, with
patterns like increasing counts of 1s/2s/3s followed by 5s/6s/7s/8s/9s.
– **Cycles**: Some numbers lead to cycles (e.g., 88, or the 7-term cycle above).
These are rare but documented.
– **No Counterexamples**: Extensive computations (up to millions of starting values)
have not found a sequence that neither diverges nor cycles, supporting the
conjecture.

### Challenges in Proving the Conjecture
Proving the RATS conjecture is difficult due to:
1. **Nonlinear Dynamics**: The process involves arithmetic (addition), digit
manipulation (reversal, zero removal, sorting), and base-10 dependence, making it
resistant to standard number-theoretic tools.

2. **Divergence vs. Cycles**: The conjecture requires showing that *every* starting
number either joins the known divergent sequence or enters a cycle, which demands
analyzing all possible digit combinations.

3. **Growth Patterns**: The divergent sequence’s growth (approximately doubling
digits) complicates analytical bounds, as carry-overs in addition create
unpredictable digit changes.

4. **Cycle Detection**: Identifying all possible cycles is challenging, as their
lengths and structures vary unpredictably.

### Approaches to a Proof
While no proof exists, here are strategies mathematicians might pursue:

1. **Invariant Analysis**:
– Seek invariants or semi-invariants in the sequence. For example, the number of
digits or digit sums might provide clues, though sorting disrupts simple patterns.
– Consider the effect of carries in a_n + rev}(a_n). Carries propagate
leftward, potentially stabilizing into patterns (e.g., repeated 5s/6s in divergent
terms).

2. **Cycle Characterization**:
– Prove that all cycles have a specific form. For instance, known cycles
(like 88 or the 7-term cycle) have symmetric or near-symmetric digit structures.
– Hypothesize that cycles arise when a_n + rev}(a_n) produces a
number with digits that, after sorting, loop back to a previous term.

3. **Divergent Sequence Dominance**:
– Show that the divergent sequence (1, 2, 4, 8, …) is an “attractor” for most
starting numbers. This could involve analyzing the probability that random starting
numbers merge into this sequence via repeated iterations.
– Study the transition from numbers like 16 to 77, where carries and sorting
shift digit patterns significantly.

4. **Digit Pattern Analysis**:
– Model the sequence as a dynamical system on digit strings. For example, treat
numbers as sorted strings and analyze transformations under reversal and addition.
– Use combinatorial arguments to bound the number of iterations before a number
enters a known sequence or cycle.

5. **Computational Exhaustion**:
– Extend computational searches to identify all cycles or a counterexample
(a sequence that neither diverges nor cycles). This is impractical for large numbers
but useful for small cases.
– For instance, all single-digit numbers (1–9) have been tested: 1, 3, 5, 9 join
the divergent sequence; 2, 4, 6, 8 merge at 2; 7 hits 88; 8 hits 88; 9 joins at 145.

### Example: Testing a Starting Number
Consider 89:
– 89 -> rev(89) = 98 -> 89 + 98 = 187 -> 178.
– 178 -> rev(178) = 871 -> 178 + 871 = 1049 -> 149.
– 149 -> rev(149) = 941 -> 149 + 941 = 1090 -> 19.
– 19 -> rev(19) = 91 -> 19 + 91 = 110 -> 11.
– 11 -> rev(11) = 11 -> 11 + 11 = 22 -> 22.
– 22 -> rev(22) = 22 -> 22 + 22 = 44 -> 44.
– 44 -> rev(44) = 44 -> 44 + 44 = 88 -> 88.
– 88 -> rev(88) = 88 -> 88 + 88 = 176 -> 167 -> 88 (cycle).

This shows 89 enters a cycle at 88, consistent with the conjecture.

### Why No Proof Yet?
The conjecture’s reliance on base-10 digit operations makes it resistant to
algebraic or analytic methods. Unlike similar problems (e.g., the Collatz conjecture),
the sorting step introduces combinatorial complexity, and zero removal disrupts
continuity. The divergent sequence’s growth suggests most numbers are “attracted”
to it, but proving this for all cases requires ruling out undiscovered cycles or
divergent paths.

### Current Status
As of 2025, the conjecture is supported by extensive computational evidence but
lacks a formal proof. Research continues in number theory and dynamical systems,
with parallels to problems like the Lychrel process (reverse-and-add without sorting).
A proof would likely require a breakthrough in modeling digit transformations or a
novel invariant that captures the sequence’s behavior.

Report a problem