OFFSET
0,1
COMMENTS
Method A = 'frequency' followed by 'digit'-indication.
EXAMPLE
E.g., the term after 1611 is obtained by saying "two 1's, one 6, one 1", which gives 211611.
MATHEMATICA
a[1]=6; a[n_]:= a[n]= IntegerReverse[ FromDigits[ Flatten[ Replace[ Replace[ Replace[ Split[ IntegerDigits[a[n-1]]], {x_, y_}->{x, Length[{x, y}]}, {1}], {x_, y_, z_}->{x, Length[{x, y, z}]}, {1}], {x_}->{x, Length[{x}]}, {1}]]]];
Array[a, 10] (* Ivan N. Ianakiev, Jul 23 2019 *)
PROG
(Python)
from re import split
A022510_list, l = [6], '6'
for _ in range(10):
l = ''.join(str(len(d))+d[0] for d in split('(0+|1+|2+|3+|4+|5+|6+|7+|8+|9+)', l[::-1]) if d)
A022510_list.append(int(l)) # Chai Wah Wu, Jan 02 2015
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved