Take any whole number (larger numbers are more interesting)
1. x=the number of even digits, y=the number of odd digits, z=the total number digits.
2. Concatenate to create the number xyz
(a leading zero is ok if x=0)
[Example: 12345678901 has x=5, y=6, z=11 for step 1 and 5611 for step 2]
3. Repeat steps 1 and 2 of this process until your number is unchanged.
What number(s) will the process terminate at?
Will the process always terminate?
Find a 20 digit starting number that terminates in the maximum number of steps (among 20 digit numbers.)
Any 20 digit number that has 10 even and 10 odd digits goes to 101020
--> 606 --> 303 --> 123 --> 123, so process ends after 5th
iteration
Any 20 digit number that does not have 10 odd and 10 even digits terminates one step faster, as follows:
1st iteration: a 5 digit number ending in 20, because the even or odd
digits in the original number (but not both) are less than 10
2nd iteration: a 3 digit number ending in 5
3rd iteration: 123 (because the the last digit of the previous number (5) is odd and so is excatly one of the 1st two digits)
4th iteration: 123 (process ends)
so the answer is : Any 20 digit number that has 10 even and 10 odd digits