@@ -794,44 +794,43 @@ preamble = '''
794794
795795['Kolakoski Constant' ]
796796category = ' Mathematics'
797- experiment = -1
798797links = [
799- { name = ' Wikipedia' , url = ' //www.wikipedia.org/wiki/Kolakoski_sequence#Kolakoski_Constant' }
798+ { name = ' Wikipedia' , url = ' //www.wikipedia.org/wiki/Kolakoski_sequence#Kolakoski_Constant' },
800799]
801800preamble = '''
802801<p>
803802 The Kolakoski constant is created by taking the
804- <a href=" kolakoski-sequence"> Kolakoski sequence </a>
805- and subtracting one from each element then interpreting it as a binary fraction.
803+ <a href=kolakoski-sequence> Kolakoski sequence</a> and subtracting one from
804+ each element then interpreting it as a binary fraction.
806805
807806<pre>
808807 1 221121221221121122121121…
809808 0.110010110110010011010010…
810809 0.7945071927…
811810</pre>
812811
813- <p> Print the Kolakoski constant to the first 1,000 decimal places </p>
812+ <p>Print the Kolakoski constant to the first 1,000 decimal places.
814813'''
815814
816815['Kolakoski Sequence' ]
817816category = ' Sequence'
818- experiment = -1
819817links = [
818+ { name = ' OEIS A000002' , url = ' //oeis.org/A000002' },
820819 { name = ' Rosetta Code' , url = ' //rosettacode.org/wiki/Kolakoski_sequence' },
821- { name = ' OEIS A000002' , url = ' //oeis.org/A000002' }
822820]
823821preamble = '''
824822<p>
825- The Kolakoski sequence is a self referential sequence where the nth element
826- is the length of the nth run of same numbers in the sequence.
823+ The Kolakoski sequence is a self referential sequence where the nth
824+ element is the length of the nth run of same numbers in the sequence.
827825 This has the interesting property where if you take the run lengths of
828- this sequence, then you will get the same sequence back again.
829- For example, the sequence starting with (1, 2) looks like:
826+ this sequence, then you will get the same sequence back again. For
827+ example, the sequence starting with (1, 2) looks like:
830828
831829<pre>
832830 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1 2 2 1 2 1 1 2 1…
833831 1 2 2 1 1 2 1 2 2 1 2 2 1 1 2 1 1…
834832</pre>
833+
835834<p>
836835 Beginning with (1, 2) output the first 1000 elements in the Kolakoski
837836 sequence, separated by spaces.
0 commit comments