Look and Say, Look and Say, Look and Say

1 , 11 , 21 , 1211 , 111221 , 312211 , 13112221 , 1,\ 11,\ 21,\ 1211,\ 111221,\ 312211,\ 13112221,\ \ldots

In the above sequence with initial term 1, each subsequent term is generated by reading off the digits of the previous term, i.e. by counting from left to right the number of repeated digits. For example,

  • 1 is read off as "one 1" or 11.
  • 11 is read off as "two 1s" or 21.
  • 21 is read off as "one 2, then one 1" or 1211.
  • 1211 is read off as "one 1, one 2, then two 1s" or 111221.

How many times does the digit 3 appear in the 3 2 nd 32^\text{nd} term of the sequence?


The answer is 1392.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Giorgos K.
Feb 20, 2018

Mathematica

Count[IntegerDigits@Nest[FromDigits@Flatten[{Length@#,#[[1]]}&/@Split@IntegerDigits@#]&,1,32-1],3]

returns 1392

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...