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!)
A022515 Describe previous term from the right (method B - initial term is 4). 4
4, 41, 1141, 114112, 21124112, 211241211221, 112212211141211221, 1122122111411322112212, 21112212223112411322112212, 21112212223112412112312311221321 (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 1141 is obtained by saying "1 once, 4 once, 1 twice", which gives 114112.

MATHEMATICA

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

PROG

(Haskell)

import Data.List (group, transpose)

a022515 n = a022515_list !! n

a022515_list = 4 : f [4] :: [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, A022514-A022520.

Sequence in context: A284276 A327026 A244751 * A172496 A059730 A006825

Adjacent sequences:  A022512 A022513 A022514 * A022516 A022517 A022518

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 20 04:34 EST 2020. Contains 332063 sequences. (Running on oeis4.)