login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A022514 Describe previous term from the right (method B - initial term is 3). 9
3, 31, 1131, 113112, 21123112, 211231211221, 112212211131211221, 1122122111311322112212, 21112212223112311322112212, 21112212223112312112312311221321 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Method B = 'digit'-indication followed by 'frequency'.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..21

EXAMPLE

The term after 1131 is obtained by saying "1 once, 3 once, 1 twice", which gives 113112.

MATHEMATICA

A022514[1]:=3; A022514[n_]:=A022514[n]=FromDigits[Flatten[{First[#], Length[#]}&/@Split[Reverse[IntegerDigits[A022514[n-1]]]]]]; Map[A022514, Range[15]] (* Peter J. C. Moses, Apr 22 2013 *)

PROG

(Haskell)

import Data.List (group, transpose)

a022514 n = a022514_list !! n

a022514_list = 3 : f [3] :: [Integer] where

   f xs = (read $ concatMap show ys) : f ys where

          ys = concat $ transpose [map head zss, map length zss]

          zss = reverse $ group xs

-- Reinhard Zumkeller, Jan 26 2014

CROSSREFS

Cf. A022481, A022488, A022515-A022520.

Sequence in context: A227787 A274592 A219266 * A094579 A029729 A319253

Adjacent sequences:  A022511 A022512 A022513 * A022515 A022516 A022517

KEYWORD

nonn,base,easy,nice

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Patrick De Geest, Jun 15 1999

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 29 08:26 EST 2020. Contains 332355 sequences. (Running on oeis4.)