# 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.

## Overview

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.

## Definitions

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

## Syntax

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

## Example

Input: 1000

Output:

0101100111000101000011110101101110000100110100100011111001011101000001101100101011111000001011001100 0111011010011110001000101010011111101110010000001101010110000110010010111101101111000000100101001101 1111100110001001001110101000110101110111100000010101011010001110011111010000100011001101100011101001 0110110000011111110101000010111001001000011101100101001110001101110101111001000001011010100101011000 1000000011111111011001100111001010001011110100110000110111000100111101110100010000101011100001101001 1011010110010011111000110000000010111111010101001001100111100110101010100011101111100001000100101101 1011100111011000000111000101100011001011111010000010010001010010111111100110100001100011110110101110 1001000000011001010111101110011001000111100101010110110100010011101111111100001010000011000101101001 1000010011101110101001101100001111000111001000101110110101000000001000110111101011111011001001010100 0111110011100001011001101001010000111110111100100110001010110101100000111001111010001000110110111110

This represents the first thousand elements of sequence .