Get Math Help

GET TUTORING NEAR ME!

(800) 434-2582

By submitting the following form, you agree to Club Z!'s Terms of Use and Privacy Policy

    Home / Get Math Help

    Kolakoski Sequence

    Sequence description

    sequence consisting of 1's and 2's that equals the length of its successive runs

    Sequence terms

    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, 2, 2, 1, 1, 2, 1, 1, 2, ...

    Table program

    Module[{a = {1, 2, 2}, k, i}, Do[AppendTo[a, 1 + Mod[k - 1, 2]], {k, 3, n}, {i, a[[k]]}]; 
 a
]

    Plot

    Plot

    Back to List | POWERED BY THE WOLFRAM LANGUAGE