You may also like

problem icon

Whole Number Dynamics I

The first of five articles concentrating on whole number dynamics, ideas of general dynamical systems are introduced and seen in concrete cases.

problem icon

Whole Number Dynamics III

In this third of five articles we prove that whatever whole number we start with for the Happy Number sequence we will always end up with some set of numbers being repeated over and over again.

problem icon

Whole Number Dynamics IV

Start with any whole number N, write N as a multiple of 10 plus a remainder R and produce a new whole number N'. Repeat. What happens?

Whole Number Dynamics II

Stage: 4 and 5
Article by Alan Beardon

In the first article Whole Number Dynamics I , we started with the following problem:

Take any whole number $M$ between $1$ and $999$ inclusive and add the squares of the digits of $M$ to get a new number $N$

(for example, if $M =29$ then $N =2^2+9^2=85$. Now repeat this process for $N$ to get a new number $P$, and then $Q$, and so on.

The question is what happens to the numbers you get in this way. After some investigationsyou will probably have seen that, regardless of which number $M$ you start with, the list of numbers you get either ends up with the consecutive numbers \begin{equation} 1,1,1,1,\ldots \end{equation} or it ends up with the cycle: \begin{equation} 145, 42, 20, 4, 16, 37, 58, 89, \ldots \end{equation} repeated again and again.

In the same article we showed (and this was the main point of the article) that if we have a rule which takes each member of a finite set into another member of the same set, and if we apply this rule repeatedly, then regardless of which rule and which set we have, we always end up with a cyclic result .

We also showed that the rule

$$M \rightarrow N \rightarrow P \rightarrow\dots$$

described above is a rule that takes each member of the set $\{1,2,3,\ldots,999\}$ into another member of this same set, so that, by what we have just said, this particular process must always end up with a cyclic result.

What we want to do now is to prove that this cyclic result must be either (1) or (2). Of course, our investigations have provided evidence that this is so, but in mathematics finding evidence for a claim is only the beginning; without a proof we cannot be absolutely certain that our claim really is true.

We shall make some progress towards the complete solution of our problem by showing that if the process $M \rightarrow N \rightarrow P \rightarrow\dots$ ends up with the same number $x$ being repeated indefinitely then $x$ must be $1$. Of course, this is only a small step towards the complete solution but very often in mathematics (as is the case here) the solution of a problem takes many steps.

We shall consider the remaining steps in later articles in this series.

We have to show that if we take a whole number between $1$ and $999$, and if, when we apply the rule $M \rightarrow N$, we get the same number back again then the number we have is $1$ (and nothing else). Of course, if we start with $1$ and add the squares of its digits we get $1^2$, which is $1$, but what we have to do now is to show that this cannot happen for any other number.

Let us choose any number in $\{1,2,3,\ldots,999\}$. If the number we pick has only one digit, say $x$, when we apply the rule we get the number $x^2$. If this is the same number that we started with then $x^2= x$ and this can only happen if $x=0$ or $x=1$. As we know that $x$ is not $0$, we see that $x$ must be $1$.

Suppose next that we have picked a two-digit number, say $x y$ (which is, of course, the same as $10x+y$; for example, $53$ is $5 \times 10 + 3)$. As $x y$ is a genuine two-digit number, $x$ cannot be $0$ (so it must be one of the numbers $1$, $2$, $\ldots$, $9$), and $y$ can be any one of the numbers $0$, $1$, $2$, $\ldots$, $9$.

Suppose now that when we apply the rule to $x y$, we get $x y$ back again. Then we have:

$$ x^2 +y^2 = x y = 10x+y$$

so that $$y^2 - y = 10x - x^2 $$

or equivalently, $$y(y - 1) = x(10 - x)$$

If we now check this for $x = 1$, $2$, $\ldots$, $9$ and $y = 0$, $1$, $2$, $\ldots$, $9$ we see that this can never happen, and this shows that there is no two-digit number which is converted back into itself when we apply the rule $M \rightarrow N$.

It remains to check that there is no 3-digit number of this type, so let us consider the three digit number $x y z$. Again, $x$ must be $1$, $2$, $\ldots$, $8$ or $9$ (else we do not have a 3-digit number). Let us suppose that when we apply the rule to $x y z$ then we get $x y z$ back again; thus $$100x + 10y + z = x y z = x^2 + y^2 + z^2$$

As each of $x$, $y$, $z$ is at most $9$, we see that $x^2+ y^2+ z^2$ is at most $243$, so that $100x + 10y + z$ is also at most $243$. This means that $x$ can only be $1$ or $2$. With this information, we now see that $x + y + z$ is at most $2^2+ 9^2 + 9^2= 166$ so that $100x + 10y + z$ is also at most $166$ so that $x$ must be $1$.

We now see that

$$100 + 10y + z = 1 + y + z $$ so that

$$99 + y(10-y) = z(z-1)$$

It is easy to see that this cannot happen simply by checking all possibilities, namely $y=0$, $1$, $2$, $\ldots$, $9$ and $z= 0$, $1$, $2$, $\ldots$, $9$.

Another (shorter) way to see that this cannot happen is to note that $z(z-1)$ is at most $9\times 8 (=72)$ so that $y(10-y)$ would have to be negative. However, it is not negative for $y=0$, $1$, $2$, $\ldots$, $9$.

We have now shown that there are no 2-digit numbers, and no 3-digit numbers which, when we apply the rule $M \rightarrow N$ to this number, gives us the same number back again.

The only 1-digit number with this property is $1$ itself so we have finally shown that if we start with a number $M$ from $\{1,2,3,\ldots,999\}$, apply the rule $M \rightarrow N$, and get $N=M$, then $M=1$.