Have no idea why it took near 2 hours for me to write this. Maybe it was the stupid OOP paper I gave today, I’ve been in a bad mood after writing a 40-pager and yet feeling unsatisfactory about it.
So back to the post’s topic: The Look and Say Sequence, which I found today while solving the level 10 of The Python Challenge, is a very odd sequence of numbers which are formed by counting and spelling out the digits sequentially.
The series looks like the following:
1 11 21 1211 111221 and so on …
How this is formed:
See the first digit 1. Spell it as One One (One in quantity that is). This is the general idea.
1 – One One: 11
11 – Two One(s): 21
21 – One Two and One One: 1211
1211 – One One, One Two and Two One(s): 111221
And on and on and on …
And now, for the Python Code.
( Took me over 80 minutes with lots of scrapping and frustration to write. Bad day )