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 A006751 M2052 #72 Feb 16 2025 08:32:30 %S A006751 2,12,1112,3112,132112,1113122112,311311222112,13211321322112, %T A006751 1113122113121113222112,31131122211311123113322112, %U A006751 132113213221133112132123222112,11131221131211132221232112111312111213322112,31131122211311123113321112131221123113111231121123222112 %N A006751 Describe the previous term! (method A - initial term is 2). %C A006751 Method A = 'frequency' followed by 'digit'-indication. %C A006751 No digit exceeds 3. If the starting number a(1) is a single-digit number greater than 3 this will remain as the last digit, all the remaining in any term being no greater than 3. - _Carmine Suriano_, Sep 07 2010 %C A006751 a(n) = value of concatenation of n-th row in A088203. - _Reinhard Zumkeller_, Aug 09 2012 %C A006751 This is because for all n > 1, a(n) begins with 1 or 3 and ends with 2. - _Jean-Christophe Hervé_, May 07 2013 %C A006751 a(n+1) - a(n) is divisible by 10^5 for n > 5. - _Altug Alkan_, Dec 04 2015 %D A006751 S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 452-455. %D A006751 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %D A006751 I. Vardi, Computational Recreations in Mathematica. Addison-Wesley, Redwood City, CA, 1991, p. 4. %H A006751 T. D. Noe, <a href="/A006751/b006751.txt">Table of n, a(n) for n=1..20</a> %H A006751 J. H. Conway, <a href="http://dx.doi.org/10.1007/978-1-4612-4808-8_53">The weird and wonderful chemistry of audioactive decay</a>, in T. M. Cover and Gopinath, eds., Open Problems in Communication and Computation, Springer, NY 1987, pp. 173-188. %H A006751 S. R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/constant/cnwy/cnwy.html">Conway's Constant</a> [Broken link] %H A006751 S. R. Finch, <a href="http://web.archive.org/web/20010207194413 /http://www.mathsoft.com/asolve/constant/cnwy/cnwy.html">Conway's Constant</a> [From the Wayback Machine] %H A006751 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LookandSaySequence.html">Look and Say Sequence</a> %F A006751 a(n+1) = A045918(a(n)). - _Reinhard Zumkeller_, Aug 09 2012 %e A006751 E.g. the term after 3112 is obtained by saying "one 3, two 1's, one 2", which gives 132112. %t A006751 RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ]; LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ]; F[ n_ ] := LookAndSay[ n, 2 ][ [ n ] ]; Table[ FromDigits[ F[ n ] ], {n, 11} ] (* _Zerinvary Lajos_, Mar 21 2007 *) %o A006751 (Haskell) %o A006751 a006751 = foldl1 (\v d -> 10 * v + d) . map toInteger . a088203_row %o A006751 -- _Reinhard Zumkeller_, Aug 09 2012 %o A006751 (Perl) %o A006751 # This outputs the first n elements of the sequence, where n is given on the command line. %o A006751 $s = 2; %o A006751 for (2..shift @ARGV) { %o A006751 print "$s, "; %o A006751 $s =~ s/(.)\1*/(length $&).$1/eg; %o A006751 } %o A006751 print "$s\n"; %o A006751 ## Arne 'Timwi' Heizmann (timwi(AT)gmx.net), Mar 12 2008 %o A006751 (Python) %o A006751 l=[2] %o A006751 n=s=1 %o A006751 y='' %o A006751 while n<21: %o A006751 x=str(l[n - 1]) + ' ' %o A006751 for i in range(len(x) - 1): %o A006751 if x[i]==x[i + 1]: s+=1 %o A006751 else: %o A006751 y+=str(s)+str(x[i]) %o A006751 s=1 %o A006751 x='' %o A006751 n+=1 %o A006751 l.append(int(y)) %o A006751 y='' %o A006751 s=1 %o A006751 print(l) # _Indranil Ghosh_, Jul 05 2017 %Y A006751 Cf. A001140, A001141, A001143, A001145, A001151, A001154, A001155, A005150, A006715, A045918. %Y A006751 Cf. A088203 (continuous version). %K A006751 nonn,base,easy,nice %O A006751 1,1 %A A006751 _N. J. A. Sloane_