login
A022482
Describe previous term from the right (method A - initial term is 2).
25
2, 12, 1211, 211211, 21122112, 1221222112, 122132112211, 2122211213112211, 21222113111221321112, 123112131122311321321112, 123112131112132113222113111221131211
OFFSET
1,1
COMMENTS
Method A = 'frequency' followed by 'digit'-indication.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..22
Eric Weisstein's World of Mathematics, Look and Say Sequence
FORMULA
a(n+1) = A045918(A004086(a(n))). - Reinhard Zumkeller, Mar 02 2014
EXAMPLE
E.g. the term after 1211 is obtained by saying "two 1's, one 2, one 1", which gives 211211.
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 *)
PROG
(Haskell)
a022482 n = a022482_list !! (n-1)
a022482_list = iterate (a045918 . a004086) 2
-- Reinhard Zumkeller, Mar 02 2014
CROSSREFS
KEYWORD
nonn,base,easy,nice
STATUS
approved