Kolakoski Sequence - MATLAB Cody - MATLAB Central

Problem 45321. Kolakoski Sequence

Difficulty:Rate

This is a modified version of the kolakoski sequence.

Refer to the problem https://www.mathworks.com/matlabcentral/cody/problems/2371 for the original one.

for this case,

Given a particular initial vector a and length x, generate the kolakoski sequence (first x terms) from that vector.

For example if a=[2,1] and x=10 ; the sequence would look like --

 2     2     1     1     2     1     2     2     1     2     2

Solution Stats

57.14% Correct | 42.86% Incorrect
Last Solution submitted on Sep 28, 2023

Problem Comments

Solution Comments

Show comments

Group

Number theory Image
Number theory
  • 44 Problems
  • 21 Finishers

Problem Recent Solvers13

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page