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.

A022519 Describe previous term from the right (method B - initial term is 8).

This page as a plain text file.
%I A022519 #16 Sep 01 2021 13:37:10
%S A022519 8,81,1181,118112,21128112,211281211221,112212211181211221,
%T A022519 1122122111811322112212,21112212223112811322112212,
%U A022519 21112212223112812112312311221321
%N A022519 Describe previous term from the right (method B - initial term is 8).
%C A022519 Method B = 'digit'-indication followed by 'frequency'.
%H A022519 Reinhard Zumkeller, <a href="/A022519/b022519.txt">Table of n, a(n) for n = 0..21</a>
%e A022519 The term after 1181 is obtained by saying "1 once, 8 once, 1 twice", which gives 118112.
%o A022519 (Haskell)
%o A022519 import Data.List (group, transpose)
%o A022519 a022519 n = a022519_list !! n
%o A022519 a022519_list = 8 : f [8] :: [Integer] where
%o A022519    f xs = (read $ concatMap show ys) : f ys where
%o A022519           ys = concat $ transpose [map head zss, map length zss]
%o A022519           zss = reverse $ group xs
%o A022519 -- _Reinhard Zumkeller_, Jan 26 2014
%o A022519 (Python)
%o A022519 from itertools import groupby
%o A022519 A022519_list = [8]
%o A022519 for _ in range(10):
%o A022519     A022519_list.append(int(''.join(str(k)+str(len(list(g))) for k, g in groupby(str(A022519_list[-1])[::-1])))) # _Chai Wah Wu_, Sep 01 2021
%Y A022519 Cf. A022481, A022488, A022514-A022520.
%K A022519 nonn,base,easy,nice
%O A022519 0,1
%A A022519 _N. J. A. Sloane_
%E A022519 More terms from _Patrick De Geest_, Jun 15 1999