Monday, June 27, 2011

Sequence of numbers. What is next?

1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211 . What is the next in sequence? write the code to generate the sequence.

2 comments:

  1. 31131211131221

    show why a "4" will never appear in the sequence.

    ReplyDelete
  2. http://en.wikipedia.org/wiki/Pea_pattern

    ReplyDelete