1. Summing the Squares of a Number's Digits Some Examples : 92, 85, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4 135, 35, 34, 25, 29, 85, 89, 145, 42, 20, 4 49, 97, 130, 10, 1, 1 70, 49, 97, 130, 10, 1 Notation: s ( n ) = sum of the squares of the digits of n . s (9999) = 324. Let’s look at the spreadsheet (how do we do this on a spreadsheet?)
2. Theorem 1: For each natural number n < 10000, s ( s ( s ( s ( s ( s ( s ( n ) )))))) equals 1 or 4 after a finite number of compositions of the function s with itself. Proof: s ( n ) 324 for each natural number n < 10000. And, we verified by inspection (spreadsheet) that for all n 324, s ( s ( s ( s ( s ( s ( s ( n ) )))))) equals 1 or 4 after a finite number of compositions of the function s with itself. Theorem 2: For each natural number n , s ( s ( s ( s ( s ( s ( s ( n ) )))))) equals 1 or 4 after a finite number of compositions of the function s with itself. To Do: Prove Lemma 1 and Theorem 2 and do Exercises 1 and 2.