If I understand you correctly, you are defining a function C(n) (c stands for "collapse"), which replaces runs of consecutive identical digits by their sum; then you define D(n) as n (if n == C(n)) and D(C(n)) otherwise -- in other words, keep applying C until the result stops changing. Your overall question is about the dynamics of E(n) = D(2n). If that's correct, then I think 178 is the smallest element of a 24-step loop. I did that by hand. For some reason I keep making stupid mistakes trying to code this. On Tue, Jun 5, 2012 at 3:50 AM, Eric Angelini <Eric.Angelini@kntv.be> wrote:
Hello Math-Fun, I'm looking for loops with the hereunder rules: -start with a(1) -if a substring of a(1) is made of identical digits, replace the said substring with the sum of its digits -iterate until there are no more substrings with identical digits in a(1) -double a(1) and start the pro- cedure again.
Ex. a(1)= 55027771 a(1)=1002211 a(1)=1042 a(2)=2084 a(3)=4168 a(4)=8336 a(4)=866 a(4)=812 a(5)=1624 etc.
18 enters in the loop 18-36-72-144-(18) Best, É.
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun