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.

A022520 Describe previous term from the right (method B - initial term is 9).

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