I like to create problems for myself, While playing with my calculator, I found the following result. Take any positive digit $a_0$, and let $a_n$ denote the sum of digit squares of $a_{n-1}$. Then there exists a $k$ such that $a_k=1$ or $4$.

(For a single digit number,$n$ take, $0^2+n^2$). I am not sure the result is true or false in general.

For example($a_0 = 679$)









Example 2($a_0=30$)







the rest is same

Even if the general result isn't true I would like to ask, why do most of the numbers behave this way?

  • $\begingroup$ What is "a +ve integer"? $\endgroup$ – 5xum Apr 23 '14 at 7:55
  • $\begingroup$ I don't get what you mean. $\endgroup$ – evil999man Apr 23 '14 at 7:56
  • $\begingroup$ Any positive integer... $\endgroup$ – Tom Lynd Apr 23 '14 at 7:56
  • $\begingroup$ @TomLynd Then I don't understand the question. If $a_k$ denotes the sum of digit squares of the positive integer $3$, then $a_k=9$ and $a_k\neq 1,4$. $\endgroup$ – 5xum Apr 23 '14 at 8:02
  • $\begingroup$ @5xum I have updated the question $\endgroup$ – Tom Lynd Apr 23 '14 at 8:03

I believe this question can be solved as a combination of brute force and mathematics. It is simple to verify that your conjecture holds for $a_0<1000$ using a simple program, for example (written in Python):

for curr in range(1,1000):
    s = set()
    while True:
        ints = [int(j)*int(j) for j in str(curr)]
        curr = sum(ints)
        if curr in s:
            if 1 not in s and 4 not in s:
                return False
return True

Now all you have to show is that for any starting integer $a_0$, there exists such a $k$ that $a_k <1000$. This is simple to show since for $a_n>1000$, you can show that $a_{n+1} < a_n$:

Let $k$ be the number of digits of $a_n$. Then it is clear that $a_n>100k$, while on the other hand you know that $$a_{n+1} \leq 9^2+9^2+\dots+9^2=k\cdot 9^2\leq 100k<a_n.$$

NOTE: the inequalities I used are quite rough (meaning the proof could be made much more elegant), but they do work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.