﻿ Some Formulas for the Generalized Kolakoski Sequence <i>Kol</i>(<i>a, b</i>)
Publications are Open
Access in this journal
Article Versions
Export Article
• Normal Style
• MLA Style
• APA Style
• Chicago Style
Research Article
Open Access Peer-reviewed

### Some Formulas for the Generalized Kolakoski Sequence Kol(a, b)

Abdallah Hammam
Turkish Journal of Analysis and Number Theory. 2017, 5(4), 139-142. DOI: 10.12691/tjant-5-4-4
Received April 07, 2017; Revised May 11, 2017; Accepted June 14, 2017

### Abstract

We present here a new approach to investigate the Kolakoski sequence Kol(a, b). In the first part of this paper, we give some general identities. In the second, we state our main result, which concerns the frequency of the letters in the case where a and b are odd. Finally, we give an algorithm to compute the term Kn in the particular case of Kol(1, 3).

### 1. Introduction

The Kolakoski sequence or comes from the generalization of the well-known Oldenburger-Kolakoski sequence 4, 5, 8. It starts with contains only letters from the alphabet set and it doesn’t change by the run length encoding operator

The case where a and b are odd, has been explored by Baake et al 1 who found a connection between the generalized Kolakoski sequence and some deformed model sets. They used Perron-fronebius Theorem and found that the frequency of ’3’ in is ””.

Brlek et al 2 studied smooth words on 2-letter alphabet having the same parity and proved that the frequency of both letters is when a and b are even. They also presented an expression of the asymptotic density of the letter b when a = 1 and b is odd of the form The case when a+b is odd is more difficult. Shen 6 has investigated this case but, did focus his work on some ”expansion” functions rather than on the frequency of letters. Until now, no expression of the limiting density of the letters is available.

### 2. Notation

We first introduce some definitions and notation:

Let where a and b are positive integers: be the input alphabet set and let be the set of all finite words over We let denote the run-length encoding operator, such that if W is an element of then will be the new word containing lengths of blocs of similar digits, in the initial word For instance, We now define the primitive operator in the same way than Hammam 3, by:

If is an element of then will be the unique word of starting from the left by and satisfying the encoding condition: As a consequence, if we let denote for every the word with then Here, is the partial sum defined by:

Therefore, the infinite Oldenburger-Kolakoski word can be seen as a fixed point of the function

We also need to define the double sequence by :

and

In the end, we define the density of the letter ′b′ in the word by

We will try to find

### 3. Some Identities for the General Kolakoski Sequence Kol(a, b)

Lemma 1. For every :

 (1)

where

Proof. This equality simply means that if N is even, then in there are as many odd indices as even ones, and if N is odd, the number of odd indices is greater by 1. As a consequence, we have the following useful equality

 (2)

Lemma 2. For every :

Proof. For each , we have by definition,

 (3)

When we integrate the word the odd indices will become ′aaa...′ and the even will be transformed to ′bbb...′. So

but, on the other hand, we have

with Thus, after simplification, we find

 (4)

Lemma 3. If we put C = b − a, then for every :

 (5)

Proof. Written using the cardinals defined above, equation (4) becomes

and by equation (1), we get

Finally, equation (5) is simply obtained by replacing by and using the fact that

### 4. The Density of b’s in Kol(a, b)

When we integrate the finite word we get the word and the letters change with respect to a certain transformation which depends on the parity of a and b.

4.1.The Density of b’s in Kol(2m+1, 2m+2n+1)

In this case, the integration operation is defined by the following matrix

This matrix comes from the fact that and have the same parity.

Proposition 4. If then L is a root of the following third order equation

 (6)

where C = b − a.

Proof. Using lemma 3, we have

Using the matrix integration and the fact that and N have the same parity, we find that

and finally, by equation (2),

And if we use equation (3), we obtain

 (7)

As a consequence, if we assume that then and when equation (7) gives

If we put y = Cx + a, equation (6) will take the form

And a graphical study shows that this equation has always a real solution corresponding to a density given by

with and

For instance, with a = 1 and b = 3, we find the same value of Baake et al 1 .

4.2. The Density of b’s in Kol(2m, 2m + 2n)

In this case, the integration operation is defined by the following matrix

Using lemma 3 with SN instead of N, we obtain

since SN is always even.

This proves that if exists, it should be

4.3. The Density of b’s in Kol(2m+1, 2m+2n)

In this case, the integration operation is defined by the following matrix

The structure of the matrix changes at each iteration. This shows the complexity of this case and explains the difficulty to find the density.

### 5. Expression the Term Kn for a = 1 and b = 3

Proposition 5. Let and p be the unique integer satisfying then

Proof. For every we have that and in the worst case,

which gives

Using a disjunction of cases argument and Table 1 and Table 2, we derive the expression of term KN.

As an example, for we have and so and

### 6. Concluding Remarks

The approach adopted here is, in a certain way, similar to the method used bay Sing 7 in the case where a and b are even. The difference is that we treat the terms of the sequence as numbers instead of string of characters. We also revealed the dependence of the sequence on the parity of the partial sum

We obtained our main result of proposition 4, by a simple recursive relation, and without any additionnal condition on a and b.

We understand now why the case where a and b have not the same parity is complex.

Our next investigation will focus on this case.

### Acknowledgements

The author would like to express his gratitude to Anonymous referees for their careful reading of the manuscript and for giving me some of their precious time.

### References

 [1] M. Baake and B. Sing, Kolakoski (3,1) is a (deformed) model set, Canad. Math. Bull.47(2):168-90 (2004). In article View Article [2] S. Brlek, D. Jamet and G. Paquin, Smooth words on 2-letter alphabet having same parity, Theoritical Computer Science, Elsevier, 2008, 393 (1-3), pp 166-181. In article View Article [3] A. Hammam, Some new Formulas for the Kolakoski Sequence A000002. Turkish Journal of Analysis and Number Theory . 2016; 4(3):54-59. In article View Article [4] W. Kolakoski, Problem 5304: Self Generating Runs, Amer. Math. Monthly 72 (1965), 674. In article [5] Rufus Oldenburger, Exponent trajectories in symbolic dynamics, Trans Amer. Math. Soc. 46 (1939), 453-466. In article View Article [6] B. Shen, A uniformness of the Kolakoski sequence, graph, connectivity and correlations (2017) arXiv :1703.00180. In article View Article [7] B. Sing, Kolakoski(2m,2n) are limit-periodic Model Sets, arXiv 0207037. In article View Article [8] N. J. A. Sloane, The On-line Encyclopedia of Integer Sequences, published electronically at http://oeis.org. In article View Article