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 A240595 #7 Feb 16 2025 08:33:21 %S A240595 1,1,1,2,1,1,1,1,2,3,1,1,2,2,1,1,1,2,3,3,2,1,1,2,3,2,2,2,1,2,3,1,4,1, %T A240595 1,2,3,3,1,1,1,1,2,3,4,4,1,2,1,1,2,3,4,3,2,1,2,1,2,3,4,2,3,2,1,1,2,3, %U A240595 4,2,3,2,1,1,2,3,4,2,3,2,1,1,2,3,4,2 %N A240595 Look-and-Say table, where in row(n+1) the sorted list of distinct terms of row(n) is preceded by the list of numbers of their occurrences. %C A240595 For n > 13: row(n) = row(13), see example. %H A240595 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LookandSaySequence.html">Look and Say Sequence</a> %H A240595 Wikipedia, <a href="http://en.wikipedia.org/wiki/Look-and-say_sequence">Look-and-say sequence</a> %e A240595 . 1: [1] -> 1x1 -> [1 | 1] -> row(2) %e A240595 . 2: [1,1] -> 2x1 -> [2 | 1] -> row(3) %e A240595 . 3: [2,1] -> 1x1, 1x2 -> [1,1 | 1,2] -> row(4) %e A240595 . 4: [1,1,1,2] -> 3x1, 1x2 -> [3,1 | 1,2] -> row(5) %e A240595 . 5: [3,1,1,2] -> 2x1, 1x2, 1x3 -> [2,1,1 | 1,2,3] -> row(6) %e A240595 . 6: [2,1,1,1,2,3] -> 3x1, 2x2, 1x3 -> [3,2,1 | 1,2,3] -> row(7) %e A240595 . 7: [3,2,1,1,2,3] -> 2x1, 2x2, 2x3 -> [2,2,2 | 1,2,3] -> row(8) %e A240595 . 8: [2,2,2,1,2,3] -> 1x1, 4x2, 1x3 -> [1,4,1 | 1,2,3] -> row(9) %e A240595 . 9: [1,4,1,1,2,3] -> 3x1, 1x2, 1x3, 1x4 -> [3,1,1,1 | 1,2,3] -> row(10) %e A240595 . 10: [3,1,1,1,1,2,3,4] -> 4x1, 1x2, 2x3, 1x4 -> [4,1,2,1 | 1,2,3,4] %e A240595 . 11: [4,1,2,1,1,2,3,4] -> 3x1, 2x2, 1x3, 2x4 -> [3,2,1,2 | 1,2,3,4] %e A240595 . 12: [3,2,1,2,1,2,3,4] -> 2x1, 3x2, 2x3, 1x4 -> [2,3,2,1 | 1,2,3,4] %e A240595 . 13: [2,3,2,1,1,2,3,4] -> 2x1, 3x2, 2x3, 1x4 -> [2,3,2,1 | 1,2,3,4] %e A240595 . 14: [2,3,2,1,1,2,3,4] = row(13). %o A240595 (Haskell) %o A240595 import Data.List (sort, group) %o A240595 a240595 n k = a240595_tabf !! (n-1) !! (k-1) %o A240595 a240595_row n = a240595_tabf !! (n-1) %o A240595 a240595_tabf = iterate f [1] where %o A240595 f xs = concat [map length zss, map head zss] %o A240595 where zss = group $ sort xs %Y A240595 Cf. A034002. %K A240595 nonn,tabf %O A240595 1,4 %A A240595 _Reinhard Zumkeller_, Apr 08 2014