6 kyu

Look and say numbers

1,764 of 2,639Svenito

Description:

There exists a sequence of numbers that follows the pattern

          1
         11
         21
        1211
       111221
       312211
      13112221
     1113213211
          .
          .
          .

Starting with "1" the following lines are produced by "saying what you see", so that line two is "one one", line three is "two one(s)", line four is "one two one one".

Write a function that given a starting value as a string, returns the appropriate sequence as a list. The starting value can have any number of digits. The termination condition is a defined by the maximum number of iterations, also supplied as an argument.

Recursion
Algorithms

Stats:

CreatedAug 12, 2014
PublishedAug 12, 2014
Warriors Trained6467
Total Skips643
Total Code Submissions8521
Total Times Completed2639
Python Completions1764
JavaScript Completions851
Ruby Completions63
COBOL Completions3
Julia Completions13
Total Stars129
% of votes with a positive feedback rating90% of 484
Total "Very Satisfied" Votes392
Total "Somewhat Satisfied" Votes86
Total "Not Satisfied" Votes6
Ad
Contributors
  • Svenito Avatar
  • jhoffner Avatar
  • mcclaskc Avatar
  • arichidoru Avatar
  • stellartux Avatar
  • Glyxerine Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
  • PetitLu117 Avatar
Ad