## Destinies of Numbers

Do you know that numbers have destinies? Well, to have a destiny, a number needs to have a life, or in mathematical terms, destinies are defined with respect to an operation or a function.

I know the term “destiny” from John Conway, the creator of the Game of Life. It would be harmonious to assume that he suggested this term.

**Case 1. SOD.** Suppose our function is the sum of digits of a number, denoted as SOD. Then the trajectory of a number *k* is the sequence *a(n)*, such that *a(0) = k* and *a(n+1) = SOD(a(n))*.

Two numbers have the same destiny with respect to SOD if the tails of their trajectories coincide. Suppose *a(n)* and *b(n)* are two trajectories. Then the numbers *a(0)* and *b(0)* on which these trajectories are build have the same destiny if there exist *N* and *M*, such that for any *j, a(N+j) = b(M+j)*. In particular, all numbers in the same trajectory *a(n)* have the same destiny.

In the above example of SOD, any trajectory of a positive integer ends with a one-digit non-zero number repeating many times. It follows that all the natural numbers have 9 different destinies with respect to SOD, which only depend on the remainder of the number modulo 9.

Given an operation, we can build another sequence that is called “the first occurrence of a new destiny”. This is the sequence of numbers *c(n)* such that *c(n)* is the smallest number with its destiny. For the SOD operation, the sequence of the first occurrences of new destinies is finite and is equal to: 1, 2, 3, 4, 5, 6, 7, 8, 9.

**Case 2. The next prime.** Let us consider a different example. Let the function *f(n)* be the next prime after *n*. Then wherever we start, the tail of the trajectory with respect to the function *f(n)* is a sequence of consecutive prime numbers. Therefore, with respect to this function all integers have the same destiny.

**Case 3. Reverse.** Suppose *f(n)* is a reverse of *n*. If a number is a palindrome, then its trajectory is a one-cycle consisting of that number. If a number is not a palindrome, then its trajectory is a two-cycle consisting of a number and its reverse. The first appearance of a new destiny is sequence A131058 — a list of numbers *n* whose reverse is not less than *n*. In this case, instead of studying destinies, it might be more interesting to study types of destinies. For this operation we have two types: one-cycles for palindromic integers and two-cycles for non-palindromic integers.

**Case 4. The sum of proper divisors.** For the next example, let *f(n)* denote the sum of proper divisors. Let’s look at the trajectory of 15: it is 15, 9, 4, 3, 1, 0. The sum of proper divisors of zero is not-defined or is equal to infinity, whichever you prefer. So, let us say the trajectory of 15 is finite, and ends with 1, 0. This situation makes the definition of destinies more complicated, but it is appropriate to say that finite sequences have the same destinies if they end with the same number. For our example of sums of proper divisors all finite sequences end with 0. Thus all the numbers whose trajectories are finite have the same destinies. The sequence of new destinies starts 1, 6, 28, 220, …; and we do not know what the next number is because for 276 we do not know the behavior of its trajectory. Even when we know what kind of life the number is living the destinies are not always clear.

**Case 5. TITO.** The next interesting example is the TITO operation. TITO is an abbreviation of “Turning Inside, Turning Outside”. By definition, to calculate TITO(*n*) you need to reverse the prime factors of *n*, multiply them back together (with multiplicities) and reverse the result. For example, to calculate TITO(68), we first find prime factors of 68, which are 2, 2 and 17. We reverse them and multiply: 2*2*71 = 284. Then we reverse the result: TITO(68) = 482.

It is easy to see that prime numbers are among the fixed points of the TITO operation. That means all prime numbers have different destinies of the same type: they end with a one-cycle. There are numbers other than prime that have one-cycle destinies. For example, a palindrome that is a product of palindromic primes is a fixed point of the TITO operation. There are other cases too: for example 26 is a fixed point, but is neither prime nor palindromic. There are numbers that have one-cycle destinies, but are not the fixed points of TITO operation themselves. For example, the trajectory of 49 starts with the following sequence: 49, 94, 841, 4648, 8212, 80041, 415003, 282145, 54796, 849667, 3652951, 35429422, 2941879, 27075955, 5275759, 5275759, 5275759. ….

There are numbers that generate two-cycles. For example, 12 and 156. For numbers *n* that have only palindromic factors, *TITO(n)* is equal to the reverse of *n*. If *n* is not a palindrome and the reverse of *n* has only palindromic factors, then the trajectory of *n* is a two-cycle. Not all two-cycles are like that. Take for example 291 which is a product of primes 3 and 97. Thus, TITO(291) is the reverse of 3*79, which is equal to 732. On the other hand, 732 = 2*2*3*61. Hence, TITO(732) = reverse(2*2*3*16) = 291.

There are longer cycles too. Take for example 15, which generates a cycle of length 7: 15, 51, 312, 447, 3282, 744, 213, 15, …. Also, for some numbers we do not know if there is a cycle. The smallest number for which I myself do not know whether the trajectory tends to infinity or collapses into a cycle is 78.

For the TITO operation we might be more interested in types of destinies. Personally, I am interested not only in the types of destinies, but also in sets of numbers that have the same destinies for the same reasons. For example, I am interested in dividing numbers of one-cycle TITO destinies into three groups: primes, palindromes with palindromic primes and other cases.

**Case 6. RATS.** I kept the RATS operation for dessert as, in my opinion, it is the most interesting operation with respect to destinies. RATS is the abbreviation of Reverse Add Then Sort. For example, to calculate RATS(732) we need to reverse 732 getting 237, then add 732 and 237 together getting 969, then sort the digits. Thus, RATS(732) = 699.

Let’s look at the RATS sequence starting with one: 1, 2, 4, 8, 16, 77, 145, 668, 1345, 6677, 13444, 55778, 133345, 666677, 1333444, 5567777, 12333445, 66666677, 133333444, 556667777, 1233334444, 5566667777, 12333334444, 55666667777, 123333334444, 556666667777, …. We can prove that this sequence is infinite, because numbers fall into a repetitive pattern with an increasing number of digits. This is the first such example in this discussion. John Conway calls the destiny of 1 “the creeper”. Conway conjectured that RATS destinies are either the creeper or a cycle.

New destinies do not appear too often in this sequence. That is why the sequence of new destinies might be of interest: 1, 3, 9, 29, 69, 2079, 3999, 6999, 10677, 20169, …. This sequence is A161590 in the Online Encyclopedia of Integer Sequences and it needs more terms. The length of the corresponding periods starting from the second term are: 8, 2, 18, 2, 2, 2, 14, which is the sequence A161593.

Destinies are kinda fun.

Share:
## David Wilson:

I’ve found a few more elements of A161590, to wit

1 1 inf

3 111 8

9 117 2

29 1223 18

69 78 2

2079 111177 2

3999 11127 2

6999 11144445 14

10677 11667 2

20169 1111113 3

10049598 111111117777 2

20008989 111111777 2

100014888 1111122267 2

100074268 111122222255 6

The first column is A161590.

The second column is the smallest element of the associated RATS cycle.

The third column is A161593.

For k >= 1, let x(k) be 2k 1’s followed by k 7’s, and y(k) = k 2’s followed by 2k 8’s. E.g:

x1 = 117, y1 = 288

x2 = 111177, x2 = 228888

x3 = 111111777, x3 = 222888888

etc.

The (x(k), y(k)) is a RATS cycle. This gives an infinite number of RATS cycles, each cycle must have a smallest number feeding it, so A161593 is infinite.

12 August 2009, 12:49 pm## Tanya Khovanova:

David,

Great job! The second column is A161592. I expect you will submit your numbers to the OEIS.

12 August 2009, 5:45 pm## David Wilson:

Maybe.

12 August 2009, 10:08 pm