A022482 Describe previous term from the right (method A - initial term is 2).
2, 12, 1211, 211211, 21122112, 1221222112, 122132112211, 2122211213112211, 21222113111221321112, 123112131122311321321112, 123112131112132113222113111221131211
Offset: 1
Examples
E.g. the term after 1211 is obtained by saying "two 1's, one 2, one 1", which gives 211211.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..22
- Eric Weisstein's World of Mathematics, Look and Say Sequence
- Wikipedia, Look-and-say sequence
Programs
-
Haskell
a022482 n = a022482_list !! (n-1) a022482_list = iterate (a045918 . a004086) 2 -- Reinhard Zumkeller, Mar 02 2014
-
Mathematica
A022482[1]:=2;A022482[n_]:=A022482[n]=FromDigits[Flatten[{Length[#],First[#]}&/@Split[Reverse[IntegerDigits[A022482[n-1]]]]]];Map[A022482,Range[15]] (* Peter J. C. Moses, Apr 22 2013 *)
Comments