login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022512 Describe previous term from the right (method A - initial term is 8). 1
8, 18, 1811, 211811, 21182112, 122112182112, 122112181112212211, 2122112231181112212211, 21221122311821132221221112, 12312211321321121821132221221112 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Method A = 'frequency' followed by 'digit'-indication.

LINKS

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

EXAMPLE

E.g., the term after 1811 is obtained by saying "two 1's, one 8, one 1", which gives 211811.

MATHEMATICA

split[n_]:=Split[Reverse[IntegerDigits[n]]];

list1[n_]:=List/@Length/@split[n]; riffle1[n_]:=Riffle[split[n], list1[n]];

tab[n_]:=Table[i, {i, 1, 2*Length[list1[n]], 2}];

list2[n_]:=Append[riffle1[n][[#]], riffle1[n][[#+1]]]&/@tab[n];

flat[n_]:=Flatten/@list2[n]; riffle2[n_]:=Riffle[Last/@flat[n], First/@flat[n]];

a[1]=8; a[n_]:=FromDigits[riffle2[a[n-1]]]; Array[a, 10] (* or *)

IntegerReverse[NestList[FromDigits[Flatten[Replace[Replace[Replace[Split[Reverse[IntegerDigits[#]]], {x_, y_}->{x, Length[{x, y}]}, {1}], {x_, y_, z_}->{x, Length[{x, y, z}]}, {1}], {x_}->{x, Length[{x}]}, {1}]]]&, 8, 9]] (* Ivan N. Ianakiev, Nov 10 2016 *)

CROSSREFS

Cf. A022506, A006711, A022482, A022507-A022513.

Sequence in context: A001151 A177367 A138492 * A146299 A081968 A076096

Adjacent sequences:  A022509 A022510 A022511 * A022513 A022514 A022515

KEYWORD

nonn,base,easy,nice

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Erich Friedman

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 15 21:06 EDT 2018. Contains 316237 sequences. (Running on oeis4.)