Re: [math-fun] Add first diff of digits and repeat
Let's say a(n) = 329441. How do we build a(n+1)? First, sum, from left to right, the absolute differences of a(n)'s digits: a(n) = 3 2 9 4 4 1 abs. diff = 1+7+5+0+3 = 16 Now add this sum to a(n) so to produce a(n+1): 329441 + 16 = 329457 = a(n+1) And repeat: [ ... ] The sequence stops when all digits off a(n) are the same, of course: If we start with 18, for instance, we have: S = 18, 25, 28, 34, 35, 37, 41, 44, 44, 44, ... Are there integers leading to infinite sequences?
no, you can never increase the number of digits. for 1-digit numbers, this is clear. for 2-digit numbers, you add <= 9 at every step, so if you reach 3-digits, the previous number is 9a for some digit a , but this would make the next term 99 . for 3-digit numbers, you add <= 18 at every step, so if you reach 4-digits, the last 3-digit number is in the range 982 - 999 . but for these numbers, you add at most 10 . thus the last 3-digit number is at least 990 . for any number of the form 99a , the next term is 999 . for n >= 4 digits, at each step, you increase by at most 9 (n - 1) , which is less than 10^(n-2) . if you reach n + 1 digits, the last n-digit number has the form 99abc...x . for such a number, you increase it by the same amount as you increase 9abc...x , which means that the sequence is the same, except for putting an extra digit of 9 in front. since n-1 digit numbers can't reach n digits, the same holds for n digit numbers by induction. mike
participants (1)
-
Michael Reid