User blog:JHeroJr/The Λ Function

The following process is repeatedly applied to any positive integer n:

For all y < -〚- log n〛, set \(x_y) to the \(y^th) digit of n.

If \(x_1) is


 * 0, drop \(x_1)


 * 1, set n to n+1


 * 2, n stays the same


 * 3, set n to 10n + \(x_2)


 * 4, set n to 〚n/10〛


 * 5, set n to 10n - \(x_1) 10^(-〚- log n〛+ 〚(log n) mod 1〛) + \(x_1)


 * 6, repeat -〚(- log n)/2〛:


 * set n to 10n - \(x_1) 10^(-〚- log n〛+ 〚(log n) mod 1〛) + \(x_1)


 * 7, set n to \(x_1) 10^(-〚- log n〛+〚(log n) mod 1〛) - \(x_1) 10^(-〚- log n〛+〚(log n) mod 1〛- 1) + \(x_2) 10^(-〚- log n〛+〚(log n) mod 1〛- 1) + n


 * 8, set n to 10n + 3

Then, set n to 10n - \(x_1) 10^(-〚- log n〛+ 〚(log n) mod 1〛) + \(x_1).
 * 9, set n to 10n + 4

Here, 〚〛 denotes the Greatest Integer function, which is defined as 〚x〛= the greatest integer less than or equal to x for any real number x.

Let us define any positive integer's time as the number of times this process is to be repeated on that integer to make it less than 10 or to make it only contain 2's. L(x) is the highest finite time of all positive integers less than 10^x. λ(x) is the length of the longest finite string of 2's produced by any positive integer less than 10^x when the process applies to that integer as many times as possible until it contains only 2's. Λ(x) = L(λ(x)).