cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A022510 Describe previous term from the right (method A - initial term is 6).

Original entry on oeis.org

6, 16, 1611, 211611, 21162112, 122112162112, 122112161112212211, 2122112231161112212211, 21221122311621132221221112, 12312211321321121621132221221112
Offset: 0

Views

Author

Keywords

Comments

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

Examples

			E.g., the term after 1611 is obtained by saying "two 1's, one 6, one 1", which gives 211611.
		

Crossrefs

Programs

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

Extensions

More terms from Erich Friedman
Showing 1-1 of 1 results.