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.

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

This page as a plain text file.
%I A022510 #21 Apr 05 2020 13:34:57
%S A022510 6,16,1611,211611,21162112,122112162112,122112161112212211,
%T A022510 2122112231161112212211,21221122311621132221221112,
%U A022510 12312211321321121621132221221112
%N A022510 Describe previous term from the right (method A - initial term is 6).
%C A022510 Method A = 'frequency' followed by 'digit'-indication.
%e A022510 E.g., the term after 1611 is obtained by saying "two 1's, one 6, one 1", which gives 211611.
%t A022510 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}]]]];
%t A022510 Array[a,10] (* _Ivan N. Ianakiev_, Jul 23 2019 *)
%o A022510 (Python)
%o A022510 from re import split
%o A022510 A022510_list, l = [6], '6'
%o A022510 for _ in range(10):
%o A022510     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)
%o A022510     A022510_list.append(int(l)) # _Chai Wah Wu_, Jan 02 2015
%Y A022510 Cf. A022506, A006711, A022482, A022507, A022508, A022509, A022511, A022512, A022513.
%K A022510 nonn,base,easy,nice
%O A022510 0,1
%A A022510 _N. J. A. Sloane_
%E A022510 More terms from _Erich Friedman_