f(n) = n + (the product of the nonzero digits of n).
Then, beginning with any positive integer, by iterating f we create an increasing sequence of integers. For example, with n=1, we have
1, 2, 4, 8, 16, 22, 26, 38, 62, 74, 102, 104, 108, 116, 122, 126, 138, 162, 174, 202, 206, 218, 234, 258, 338, 410, 414, 430, 442, 474, 586, 826, 922, 958, 1318, 1342, 1366, ...
For example, at 26 we add (2)(6)=12 to obtain 38; at 102 we ignore the 0 and add (1)(2).
3, 6, 12, 14, 18, 26, 38, 62, 74, 102, ...
Note that once we hit 26, we are in the sequence given in section II. Here are some more sequences, each shown only until they join a previously displayed sequence:
5, 10, 11, 12, ...
7, 14, ...
9, 18, ...
13, 16, ...
15, 20, 22, ...
17, 24, 32, 38, ...
19, 28, 44, 60, 66, 102, ...
21, 23, 29, 47, 75, 110, 111, 112, 114, 118, 126, ...
In 1989 I conjectured that for all positive integers n, the sequence beginning with n eventually joins the sequence beginning with 1. In 1991 I wrote a simple C program and checked that for all n up to 1,000,000, this is true. The first "stubborn" sequence is 63, 81, 89, 171, ... which takes 321 iterations to join the main sequence. In other words,
f322(63)=f261(1)=150,056.A similar phenomenon occurs in other bases. In base 2 the above
conjecture is trivial:
1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, ...
But in base 3,
(written in base 3 notation:)
1, 2, 11, 12, 21, 100, 101, 102, 111, 112, 121, 200, 202,
220, 1001, 1002, 1011, 1012, 1021, 1100, 1101, 1102, 1111, ...
10, 11, ...
20, 22, 110, 111, ...
120, 122, 210, 212, 1000, 1001, ...
201, 210, ...
211, 220, ...
221, 1002, ...
222, 1021, ...
1010, 1011, ...
1020, 1022, 1110, 1111, ...
in base 10 notation this is
1, 2, 4, 5, 7, 9, 10, 11, 13, 14, 16, 18, 20, 24, 28, 29, 31, 32, 34, 36, 37, 38, 40, ...
3, 4, ...
6, 8, 12, 13, ...
15, 17, 21, 23, 27, 28, ...
19, 21, ...
22, 24, ...
25, 29, ...
26, 34, ...
30, 31, ...
33, 35, 39, 40, ...
Note that the numbers that begin all the above sequences are numbers that do not occur in any other sequence; that is, n for which f(m)=n has no solution m. We label these numbers unattainables, and ask How many unattainables are there?
We define u(n)= number of unattainables less than or equal n.
In base 2, of course, u(n)=1 for any n. In all bases greater
than 2, if the conjecture that all sequences join is true,
then there must be infinitely many unattainables.
As the base increases (and sequences tend to move more quickly), the proportion of
unattainables increases. In any base, the proportion seems
to converge to some limit. In base 10, for example:
n | u(n)/n |
10 | .50000 |
50 | .42000 |
100 | .44000 |
500 | .42600 |
1K | .42900 |
5K | .41800 |
10K | .40890 |
50K | .41336 |
100K | .39544 |
500K | .39851 |
1M | .39712 |