Thousands of tools! Check out Online Tools – I have now added thousands of tools.
I often have to generate the look and say sequence so I created this simple online utility that does it for me. It lets you calculate however many look and say series terms you need, starting from any initial state. It works in the browser and is powered by alien technology from the future.
Look And Say Sequence Generator Options
Look And Say Sequence Generator Examples (click to try!)
1 11 21 1211 111221 312211 13112221 1113213211 31131211131221 13211311123113112211 11131221133112132113212221 3113112221232112111312211312113211 1321132132111213122112311311222113111221131221 11131221131211131231121113112221121321132132211331222113112211 311311222113111231131112132112311321322112111312211312111322212311322113212221
abc 1a1b1c 111a111b111c 311a311b311c 13211a13211b13211c 111312211a111312211b111312211c
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22
k → 1k → 111k → 311k → 13211k
[] 1[1] 111[111] 311[311] 13211[13211] 111312211[111312211] 31131122211[31131122211] 1321132132211[1321132132211]
21121111122131221113112221111321321131131211131221132113111231131122111113122113311213211321222131131122212321121113122113121132111321132132111213122112311311222113111221131221111312211312111312311211131122211213211321322113312221131122113113112221131112311311121321123113213221121113122113121113222123113221132122211321132132211331121321133112111312211213211312111322211231131122211311123113321112132113222113121132111113122113121113222123211211131221232112311311222112111312211311123113322112132113213221133112132123123112111312211332211311122113122131131122211311123113321112131221123113112211121312211213211321322112311311222113311213212322211211131221131211132221232112111312111213111213211231131122212322211331222113112211
How Does This Look And Say Sequence Generator Work?
This look and say series generator works entirely in your browser and is written in JavaScript. As each subsequent member of the series is formed by reading off the digits of the previous member, it uses the nextElement()
function to calculate every next member. In the first iteration, it passes the initial-state
value (specified in options) to this function, gets the return value, and in all next iterations, it passes the return value from the previous call. This function uses only three variables – symbol
, counter
, and result
, and a single for
loop over the current element. The variable symbol
is the character it's currently looking at, counter
is how many times it has seen this symbol repeated, and result
is used for building the return value. In the loop, it compares the current symbol
with the next one. If they are the same, then it increments the counter
value; otherwise, it appends counter + symbol
to the result
. When this loop finishes, it returns the result
and it gets appended to the lookAndSaySeq
array. This algorithm continues as long as lookAndSaySeq.length
is less than count
(sequence length; specified in options). When the algorithm terminates, this utility displays the lookAndSaySeq
array. If you entered a custom term separator
in the options, then it calls the lookAndSaySeq.join(separator)
function that converts the array with look and say values to a string, separating all the values with the specified character.
Created by Browserling
This look and say sequence generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.