login
The OEIS is supported by the many generous donors 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; text; internal format)
OFFSET
0,4
LINKS
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.
MATHEMATICA
s={1}; Do[s=Flatten[{s, {Count[s, #], #}&/@Reverse[Union[s]]}], {60}]; s (* Peter J. C. Moses, Mar 21 2013 *)
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
Sequence in context: A059959 A192812 A125127 * A114476 A260419 A117184
KEYWORD
nice,nonn,easy,base,look
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, Jun 22 2011
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 2 11:09 EDT 2024. Contains 375613 sequences. (Running on oeis4.)