TOPICS
Search

Raboter Operation


The raboter operation transforms a finite word by simultaneously deleting one letter from each maximal run of identical letters, then concatenating the remaining runs (Lenormand 2003). If the word is written as w=c_1^(l_1)...c_m^(l_m), where adjacent c_i differ, l_i>=1, and c_i^(l_i) denotes l_i copies of the letter c_i, then

 T(w)=c_1^(l_1-1)...c_m^(l_m-1).

The empty string is fixed. For a nonempty word, each application reduces its length by the number of its runs, so repeated application reaches the empty string in at most the original length. For example, the word 0011100100 gives 01100, then 10, then the empty string. Leading zeros are retained in this word operation.

For an integer base b>=2 and a nonnegative integer n, let r_b(n) be the integer obtained by applying T to the usual base-b digit string of n without leading zeros. The output is read in the same base, with leading zeros discarded and an empty result assigned the value 0. In particular, r_b(0)=0. In binary, 12=(1100)_2 gives (10)_2=2, and r_2(n) for n=0, 1, 2, ... begins 0, 0, 0, 1, 0, 0, 1, 3, ... (OEIS A318921).

For integers b>=2 and k>=1, the sum over all (k+1)-digit positive integers is

 L_b(k)=sum_(n=b^k)^(b^(k+1)-1)r_b(n)=(b(b-1))/(2b-1)(2b-1)^k-(b-1)/2b^k.

The binary case is L_2(k)=2·3^(k-1)-2^(k-1) (Zeilberger 2018). Its values for k=1, 2, ... are 1, 4, 14, 46, 146, ... (OEIS A027649). Biers-Ariel (2019) gives the general-base formula.

To obtain this formula, append a digit to a positive input whose final digit is d. A different final digit forms a singleton run and leaves the planed integer unchanged. Appending another d instead changes it to br_b(n)+d. Summing over the possible final digits gives the recurrence equation L_b(k)=(2b-1)L_b(k-1)+b^(k-1)(b-1)^2/2 for k>=2, with L_b(1)=b(b-1)/2 (Biers-Ariel 2019).

The same run-shortening rule applies to Silverman's sequence. If its terms are denoted by G(j), each integer j>=2 occurs G(j)-1 times in the output. The result begins 2, 3, 4, 4, 5, 5, 6, 6, 6, ... (OEIS A319434).


See also

Run, Run-Length Encoding, Word

Explore with Wolfram|Alpha

References

Biers-Ariel, Y. "A Generalization of the 'Raboter' Operation." 17 Feb 2019. https://arxiv.org/abs/1902.06354.Lenormand, C. "Deux transformations sur les mots." Unpublished manuscript, Nov. 17, 2003. https://oeis.org/A318921/a318921.pdf.Numberphile. "Planing Sequences (Le Rabot)." Jun. 3, 2021. https://www.youtube.com/watch?v=R4OvBB9KHMA.Sloane, N. J. A. Sequences A027649, A318921, A319434 in "The On-Line Encyclopedia of Integer Sequences."Zeilberger, D. "Proof of a Conjecture of Neil Sloane Concerning Claude Lenormand's 'Raboter' Operation (OEIS Sequence A318921)." The Personal Journal of Shalosh B. Ekhad and Doron Zeilberger. Nov. 16, 2018. https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/rabot.html.

Cite this as:

Weisstein, Eric W. "Raboter Operation." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/RaboterOperation.html

Subject classifications