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!)
A112382 A self-descriptive fractal sequence: the sequence contains every positive integer. If the first occurrence of each integer is deleted from the sequence, the resulting sequence is the same is the original (this process may be called "upper trimming"). 3
1, 1, 2, 1, 3, 4, 2, 5, 1, 6, 7, 8, 3, 9, 10, 11, 12, 4, 13, 14, 2, 15, 16, 17, 18, 19, 5, 20, 1, 21, 22, 23, 24, 25, 26, 6, 27, 28, 29, 30, 31, 32, 33, 7, 34, 35, 36, 37, 38, 39, 40, 41, 8, 42, 43, 44, 3, 45, 46, 47, 48, 49, 50, 51, 52, 53, 9, 54, 55, 56, 57, 58, 59, 60 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
This sequence is also self-descriptive in that each element gives the number of first occurrences of integers (X's in the example) that were removed just before it.
LINKS
EXAMPLE
If we denote the first occurrence of each integer by X we get:
X, 1, X, 1, X, X, 2, X, 1, X, X, X, 3, X, X, X, X, 4, X, X, 2, ...
and dropping the X's:
1, 1, 2, 1, 3, 4, 2, ...
which is the beginning of the original sequence.
MATHEMATICA
uppertrim[list_]:= Fold[DeleteCases[#1, #2, 1, 1]&, list, Range[Max[list]]]; Nest[Flatten[Append[#, Append[Range[Max[#] + 1, Max[#] + #[[Length[uppertrim[#]] + 1]]], #[[Length[uppertrim[#]] + 1]]]]] &, {1, 1}, 10] (* Birkas Gyorgy, Apr 27 2011 *)
CROSSREFS
Sequence in context: A337226 A120874 A358103 * A117384 A358799 A125160
KEYWORD
nonn
AUTHOR
Kerry Mitchell, Dec 05 2005
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 April 19 05:02 EDT 2024. Contains 371782 sequences. (Running on oeis4.)