login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051120 Start with 1; at n-th step, write down what is in the sequence so far. 4
1, 1, 1, 3, 1, 1, 3, 4, 1, 1, 4, 2, 3, 6, 1, 1, 6, 2, 4, 3, 3, 1, 2, 8, 1, 1, 8, 2, 6, 3, 4, 5, 3, 3, 2, 11, 1, 1, 11, 2, 8, 3, 6, 1, 5, 4, 4, 8, 3, 5, 2, 13, 1, 1, 13, 2, 11, 4, 8, 4, 6, 3, 5, 6, 4, 10, 3, 7, 2, 16, 1, 1, 16, 2, 13, 3, 11, 1, 10, 5, 8, 1, 7, 6, 6, 4, 5, 9, 4, 12, 3, 9, 2, 18, 1 (list; graph; refs; listen; history; internal format)
OFFSET

0,4

LINKS

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

EXAMPLE

After 1 1 1 3 1, we see "1 3 and 4 1's", so next terms are 1 3 4 1. Then "1 4, 2 3's, 6 1's"; etc.

PROG

(Haskell)

import Data.List (sort, nub, group)

a051120 n = a051120_list !! n

a051120_list = 1 : f [1] where

  f xs = seen ++ (f $ xs ++ seen) where

    seen = look (reverse $ map length $ group xs') (reverse $ nub xs')

    xs' = sort xs

    look [] []               = []

    look (cnt:cnts) (nr:nrs) = cnt : nr : look cnts nrs

-- Reinhard Zumkeller, Jun 22 2011

CROSSREFS

Cf. A005150, A079668, A055186, A079686.

Sequence in context: A133116 A059959 A192812 * A114476 A117184 A035690

Adjacent sequences:  A051117 A051118 A051119 * A051121 A051122 A051123

KEYWORD

nice,nonn,easy,base

AUTHOR

Jamie (sunshinebaby(AT)hotmail.com)

EXTENSIONS

More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999

a(28) corrected by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Jun 22 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 06:27 EST 2012. Contains 205998 sequences.