

A037220


Summarize the previous term!.


2



0, 10, 1011, 1031, 102113, 10311213, 10411223, 1031221314, 1041222314, 1031321324, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314, 1031223314
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS

Table of n, a(n) for n=0..20.


EXAMPLE

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.


MAPLE

P:=proc(q, h) local a, b, c, k, n, x; x:=[h]; for n from 1 to q do
a:=convert(x[n], base, 10); b:=0; for k from 0 to 9 do c:=numboccur(a, k);
if c>0 then b:=b*10^(ilog10(c*10+k)+1)+c*10+k; fi; od; x:=[op(x), b];
od; print(0, op(x)); end: P(19, 10); # Paolo P. Lava, Aug 30 2018


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 *)


CROSSREFS

Cf. A005151.
Sequence in context: A274069 A325493 A006937 * A179284 A138484 A022506
Adjacent sequences: A037217 A037218 A037219 * A037221 A037222 A037223


KEYWORD

nonn,base,easy


AUTHOR

N. J. A. Sloane


STATUS

approved



