A037220 Summarize the previous term!.
0, 10, 1011, 1031, 102113, 10311213, 10411223, 1031221314, 1041222314, 1031321324, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314
Offset: 0
Examples
a(0) is given as 0; a(1) is one zero -> 10; a(2) is one zero and one one -> 1011; a(3) is one zero and three ones -> 1031; a(7) and onward is 1031223314.
Crossrefs
Cf. A005151.
Programs
-
Mathematica
NestList[ FromDigits@ Flatten@ Map[IntegerDigits@ Reverse@# &, Sort@ Tally@ Flatten@ IntegerDigits@#] &, 0, 20] (* Robert G. Wilson v, Nov 28 2019, adapted from code by Michael De Vlieger in A177359 *)