The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A007651 Describe the previous term! (method B - initial term is 1). (Formerly M4768) 24
 1, 11, 12, 1121, 122111, 112213, 12221131, 1123123111, 12213111213113, 11221131132111311231, 12221231123121133112213111, 1123112131122131112112321222113113, 1221311221113112221131132112213121112312311231 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Method B = 'digit'-indication followed by 'frequency'. REFERENCES N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..25 FORMULA a(n) = Sum_{k=1..A005341(n)} A220424(n,k)*10^(A005341(n)-k). - Reinhard Zumkeller, Dec 15 2012 EXAMPLE The term after 1121 is obtained by saying "1 twice, 2 once, 1 once", which gives 122111. MATHEMATICA RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ]; LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ]; F[ n_ ] := LookAndSay[ n, 1 ][ [ n ] ]; Table[ FromDigits[ Reverse[ F[ n ] ] ], {n, 1, 15} ] a[1] = 1; a[n_] := a[n] = FromDigits[Flatten[{First[#], Length[#]}&/@Split[IntegerDigits[a[n-1]]]]]; Map[a, Range[25]] (* Peter J. C. Moses, Mar 22 2013 *) PROG (Haskell) a007651 = foldl1 (\v d -> 10 * v + d) . map toInteger . a220424_row -- Reinhard Zumkeller, Dec 15 2012 (Python) from itertools import accumulate, groupby, repeat def summarize(n, _): return int("".join(k+str(len(list(g))) for k, g in groupby(str(n)))) def aupto(terms): return list(accumulate(repeat(1, terms), summarize)) print(aupto(13)) # Michael S. Branicky, Sep 18 2022 CROSSREFS Cf. A005150, A022470, A022499, A022500-A022505. Sequence in context: A340204 A121808 A160265 * A022481 A156338 A272817 Adjacent sequences: A007648 A007649 A007650 * A007652 A007653 A007654 KEYWORD nonn,base,easy,nice AUTHOR STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 30 02:40 EST 2023. Contains 359939 sequences. (Running on oeis4.)