%I #12 Oct 06 2019 16:54:48
%S 9,91,1191,119112,21129112,211291211221,112212211191211221,
%T 1122122111911322112212,21112212223112911322112212,
%U 21112212223112912112312311221321
%N Describe previous term from the right (method B - initial term is 9).
%C Method B = 'digit'-indication followed by 'frequency'.
%H Reinhard Zumkeller, <a href="/A022520/b022520.txt">Table of n, a(n) for n = 0..21</a>
%e The term after 1191 is obtained by saying "1 once, 9 once, 1 twice", which gives 119112.
%o (Haskell)
%o import Data.List (group, transpose)
%o a022520 n = a022520_list !! n
%o a022520_list = 9 : f [9] :: [Integer] where
%o f xs = (read $ concatMap show ys) : f ys where
%o ys = concat $ transpose [map head zss, map length zss]
%o zss = reverse $ group xs
%o -- _Reinhard Zumkeller_, Jan 26 2014
%Y Cf. A022481, A022488, A022514-A022519.
%K nonn,base,easy,nice
%O 0,1
%A _N. J. A. Sloane_
%E More terms from _Patrick De Geest_, Jun 15 1999