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.
%I A023989 #16 Feb 18 2024 02:02:50 %S A023989 2,12,1112,3112,211213,312213,212223,114213,31121314,41122314, %T A023989 31221324,21322314,21322314,21322314,21322314,21322314,21322314, %U A023989 21322314,21322314,21322314,21322314,21322314,21322314,21322314,21322314,21322314,21322314,21322314,21322314 %N A023989 Look and Say sequence: describe the previous term! (method C - initial term is 2). %C A023989 Method C = 'frequency' followed by 'digit'-indication with digits in increasing order. %C A023989 Converges to 21322314 at the eleventh term. %C A023989 Depending on the initial value, the sequence may converge to a cycle of 2 or more values, for example: 123456, 111213141516, 711213141516, 61121314151617, 71121314152617, 61221314151627, 51321314152617, 51222314251617, 41421314251617, 51221334151617, 51222314251617, 41421314251617, 51221334151617. [Corrected by _Pontus von Brömssen_, Jun 04 2023] %C A023989 a(n) = A005151(n) for n > 6. - _Reinhard Zumkeller_, Jan 26 2014 %F A023989 a(n) = A047842(a(n-1)). - _Pontus von Brömssen_, Jun 04 2023 %e A023989 a(1) = 12, so a(2) = 1112 because 12 contains a digit 1 and a digit 2; a(3) = 3112 because 1112 contains three digits 1 and a digit 2 %o A023989 (Haskell) %o A023989 import Data.List (group, sort, transpose) %o A023989 a023989 n = a023989_list !! (n-1) %o A023989 a023989_list = 2 : f [2] :: [Integer] where %o A023989 f xs = (read $ concatMap show ys) : f (ys) where %o A023989 ys = concat $ transpose [map length zss, map head zss] %o A023989 zss = group $ sort xs %o A023989 -- _Reinhard Zumkeller_, Jan 26 2014 %Y A023989 Cf. A005150, A005151, A022481. %Y A023989 Cf. A047842, A118628. %K A023989 nonn,base %O A023989 0,1 %A A023989 Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Mar 19 2002