Clandestine Endorsement

From Esolang
Jump to navigation Jump to search
Clandestine Endorsement
Paradigm(s) Declarative
Designed by User:Hakerh400
Appeared in 2023
Computational class Not applicable
Major implementations Implemented
File extension(s) .txt

Clandestine Endorsement is an esolang invented by User:Hakerh400 in 2023.


This language outputs the first digits of a specific infinite binary sequence define below.

Informally, the sequence is built up iteratively by trying to keep the equal distribution of all possible sublists. We start with the empty sequence and then we iteratively append bits so that the distribution of any possible sublist of length (for any smaller than the current length of the sequence) is as close to as possible. When in doubt, we append .

We start with the empty sequence and we append bit . Now, if we append , then will appear two times, while will not appear at all. On the other hand, if we append , then both and will appear once, which is exactly the distribution we want. Therefore we append and now we have . The next bit is , because both and would give the same distribution "cost", so we choose . How exactly the distribution cost is calculated is explained below (the function ).

The real number in base (sequence treated as binary digits) is probably a normal number, since the construction of literally tries to keep the distribution of every possible sublist as close to as possible.


A sequence of type is a function where is an ordinal that represents the length of the sequence and is the smallest transfinite ordinal. Sequence is finite iff .

A list is a finite sequence. Empty list is denoted by . Length of a list is denoted by . List concatenation is represented by .

Every list is a sublist of itself. If list is a sublist of , then is also a sublist of any list obtained by inserting one element to the beginning or end of .

The set of all sequences of bits of length is represented as .

Function for , denoted as , represents the number of sublists in . For any list , and .

Function is defined for all as

Function is defined for all as

Sequence is the infinite sequence of bits whose every finite prefix , where is a single bit, has the property that


Source code consists of number . There is no input. The output is the prefix of such that .


Input: 1000



This represents the first thousand elements of sequence .


Implementation in Haskell