Take a sequence of numbers, such as .
Create another sequence using a given sequence by following these rules: whenever a number in the sequence is "alone" (meaning that a copy of that number isn't digit behind or in front of it), then replace it with a (and keep it as a if it was already a ). Whenever a number in the sequence can be found digit behind or in front of it (but there are no more copies of that same number "attached" to it), then replace the two numbers with a . To generalize the rule, whenever a "cluster" of of the same number in a row is in the sequence, replace that cluster with . Apply this rule to every "cluster" in the sequence.
If you apply these rules to the sequence mentioned above, you get , then , then , then , then , then , and finally, . It takes a total of steps to get to (the starting sequence doesn't count as a step), at which point, if you apply the rule, it just stays at .
Other than , are there any sequences of numbers that, when applied the rules above, give itself? And, if you divide the number of steps it takes to get a sequence to by the number of the number of terms in the sequence, what is the largest defined value this number could be?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Part 1: At first glance, it might seem impossible for a sequence other than [ 1 ] to give itself after applying the rules. However, there actually is a fairly simple example of another sequence that has this property. Take the infinite sequence [ 1 , 2 , 2 , 3 , 3 , 4 , 4 , 4 , 5 , 5 , 5 , 6 , 6 , 6 , 6 . . . ] (I never said that infinite sequences weren't allowed!). This sequence is constructed by taking the sequence [ 1 , 2 , 3 , 4 , 5 , 6 . . . ] , then creating clusters of slowly increasing size to make the sequence give itself when the rules are applied. So, yes , there exists another sequence that gives itself when the rules are applied.
Part 2: It would be common sense that when the rules are applied to a sequence, it can't grow larger. To maximize the value of the fraction, we want to minimize the number of terms in the sequence while maximizing the number of steps it takes to get to 1. An easy way to see what the largest value might be would be to work backwards. The way we can do this is by starting at 1 and applying the rules in reverse while keeping track of how many steps it would take to get back to 1. ⎣ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎡ S e q u e n c e : 1 2 1 − 1 1 − 2 2 − 1 − 1 1 − 1 − 2 − 1 1 − 2 − 1 − 1 − 2 1 − 2 − 2 − 1 − 2 − 1 − 1 1 − 2 − 2 − 1 − 1 − 2 − 1 − 1 − 2 − 1 1 − 2 − 2 − 1 − 1 − 2 − 1 − 2 − 2 − 1 − 2 − 1 − 1 − 2 S t e p s : 0 1 2 3 4 5 6 7 8 9 T e r m s : 1 1 2 2 3 4 5 7 1 0 1 4 R a t i o : 0 / 1 1 / 1 2 / 2 3 / 2 4 / 3 5 / 4 6 / 5 7 / 7 8 / 1 0 9 / 1 4 ⎦ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎤ By step 8, it's very easy to see why 2 3 is the largest possible value. Of course, if you take a specific infinite sequence (such as the digits of pi), no matter how many times you apply the rules, you'll never get to 1. This would mean that the ratio was ∞ ∞ , but since ∞ ∞ is undefined, that value can be ignored.