RE: [math-fun] Add odd digits, subtract even
First of all, your measures of loop size are off by 1 from the usual notation in this kind of problem; e.g., a loop a -> b -> c -> a is considered a 3 loop, not a 2 loop. A fixed point is then a 1 loop. Every chain of this sort will end in a loop of some sort. Consider a number N starting with n+2 8 digits, followed by n 0's, with n >= 1. Any number less than this which transforms to something larger will still transform to number starting with n+2 8's, and then the next term(s) will be smaller until a number less than N is reached. The chain thus cannot grow to infinity, so it must eventually loop. Certainly the length of a chain increases without limit: start with a large enough sequence of digits with the same parity (not 0's or 9's), and you will get a large number of steps in the same direction. The interesting question is whether there are arbitrarily large loops. My guess is that there are not. Essentially the same argument applies to adding even digits and subtracting odd; just look at 9's instead of 8's. Franklin T. Adams-Watters P.S. the list of fixed points should start with 0. That applies to A036301, too - which, incidently, should have the "base" keyword. -----Original Message----- From: Eric.Angelini@kntv.be
... Should be ok now ... Best, É. ________________________________________________________________________ Check Out the new free AIM(R) Mail -- 2 GB of storage and industry-leading spam and email virus protection.
I played around with this a little, and found: up to 1000000, the longest cycle is 11, and cycles of that length include the following numbers (I didn't check to be sure that I have only one representative of each, though it looks like there's enough distance between them that I'm OK): 18201 81201 108201 126201 144201 162201 180201 216201 238201 261201 283201 328201 346201 364201 382201 414201 436201 441201 458201 463201 485201 548201 566201 584201 612201 621201 634201 643201 656201 665201 678201 687201 768201 786201 801201 810201 823201 832201 845201 854201 867201 876201 889201 898201 988201 Why do they all end in 201??? Here is one element of each cycle of length 10: 128201 146201 164201 182201 218201 281201 348201 366201 384201 416201 438201 461201 483201 568201 586201 614201 636201 641201 658201 663201 685201 687980 788201 812201 821201 834201 843201 856201 865201 867980 878201 887201 An example of one full cycle, length 11: 18193 18199 18211 18204 18191 18195 18203 18197 18207 18205 18201 and length 10: 128191 128193 128197 128205 128199 128209 128207 128203 128195 128201 A cycle of length 9 that doesn't involve ending in 201 (uses 101 instead): 6109 6113 6112 6106 6095 6103 6101 6097 6107 and one that does: 16195 16205 16203 16199 16213 16210 16204 16193 16201 and here's a few really unusual ones: 600012 600005 600004 599994 600031 600029 600030 600027 600026 380037 380042 380031 380030 380028 380013 380012 380006 379995 687974 687979 687997 688015 687999 688019 688007 687992 688001 687980 867974 867979 867997 868015 867999 868019 868007 867992 868001 867980 (all the rest of length 9 or more under a million contain a number ending in 101 or 201). Of course, with more digits there will be trivial variations of these weird ones, e.g. that replace a leading 3 with 111, or a leading 6 with 42 or 24 or 222. --Joshua Zucker
participants (3)
-
Eric Angelini -
franktaw@netscape.net -
Joshua Zucker