Michael, You beat me too it. However, to be complete you need to handle 1 and 2 digit numbers: 1 digit number --> 110 or 101 2 digit number ---> 202, 211 or 220 and now we're in the 3 digit realm Victor On Fri, Oct 15, 2010 at 10:31 AM, Michael Kleber <michael.kleber@gmail.com>wrote:
On Fri, Oct 15, 2010 at 10:06 AM, Eric Angelini <Eric.Angelini@kntv.be
wrote:
Hello Math-fun,
a little puzzle slightly adapted from here (in French),
thanks to my friend Alexandre Wajnberg:
http://dev.ulb.ac.be/urem/IMG/pdf/PRO12102010.pdf
For any natural number "n" (base-10-written) we build
"next-n" like this:
- write the quantity of digits of "n"
- concatenate the quantity of even digits in "n"
- concatenate to the former concatenation the quantity
of odd digits in "n"
Example for "n" = 80322057626942
- there are 14 digits in "n": --> 14
- there are 10 even digits in "n": --> 1410
- there are 4 odd digits in "n": --> 14104
If we iterate the construction, we get the sequence:
80322057626942, 14104, 532, 312, 312, 312, ...
Another example:
5771, 404, 330, 312, 312, 312, ...
Is 312 the end of all such sequences?
Yes, certainly it is.
312 is a fixed point.
If the input is 3 digits, then the output is one of 330, 321, 312, 303. So any 3-digit number becomes 312 in <=2 steps.
Any input with up to 9 digits must have an output that's 3 digits. So any number up to 9 digits becomes 312 in <=3 steps.
Any larger input has an output that's fewer digits than the input, so eventually reaches something 9 digits or less, and so reaches 312. (If you want bounds better than "eventually", though, you can continue the above logic: any input up to 999 digits produces an output with at most 9 digits, so becomes 312 in <=4 steps.)
--Michael
-- Forewarned is worth an octopus in the bush. _______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun