The following sequences go by the rule:
= The sum of the squares of the individual digits of
For example, 56 becomes 61, because + = = 61.
The following is an example of a bad sequence, because it reaches the number 1, and stays there.
{28, 68, 100, 1, 1, 1…}
The following is an example of a good sequence, because it repeats and is non-terminating:
{30, 3, 9, 81, 65, 61, 37 , 58, 89, 145, 42, 20, 2, 4, 16, 37 …}
If I create all sequences from 51 to 60 (inclusive), how many will be "good"?
Super Challenge: Can you find the general set of starting numbers that will make a sequence "good"/"bad"?
Ultimate Challenge: Prove It!
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The method I used is the crudest way. Forgive me.
Initially, we know that the sequence will only be bad if the sum of squares of the digits are 100 or 10. We know that every composite integer n can be expressed as a sum of squares if every prime factor p ≡ 3 ( m o d 4 ) has an even multiplicity (or zero multiplicity, which just means that no such factor exists for that number). For both 100 and 10, it can be both expressed as a sum of two squares.
For 1 0 0 , the possible previous terms would be 6 8 or 8 6 . For 1 0 , the possible previous terms would be 1 3 or 3 1 .
Out of these four numbers, 3 1 and 8 6 have prime factors p ≡ 3 ( m o d 4 ) that have an odd multiplicity. Therefore these numbers can no longer be further expressed as a sum of squares. So, if these are the starting numbers of the sequence, your sequence will be bad.
Meanwhile, 1 3 and 6 8 can still be expressed as a sum of squares.
For 6 8 , the possible previous terms would be 8 2 or 2 8 . For 1 3 , the possible previous terms would be 2 3 or 3 2 .
Then we remove 2 8 and 2 3 , and again iterate on 8 2 and 3 2
For 8 2 , the possible previous terms would be 9 1 or 1 9 . For 3 2 , the possible previous term would just be 4 4 .
Then we remove all 9 1 , 4 4 and 1 9 , because they all have prime factors p ≡ 3 ( m o d 4 ) that have an odd multiplicity.
In summary, we have the following starting numbers that will surely give a bad sequence.
1 0 , 1 3 , 1 9 , 2 3 , 2 8 , 3 1 , 3 2 , 4 4 , 6 8 , 8 2 , 8 6 , 9 1 , and 1 0 0 .
Thus, we can conclude that from 51-60, all sequences are good.
UPDATE! I found out that these numbers which start bad sequences are called "happy numbers".