

A112377


A selfdescriptive fractal sequence: if 1 is subtracted from every term and any zero terms are omitted, the original sequence is recovered (this process may be called "lower trimming").


6



1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 3, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 5, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2, 1, 1, 3, 1, 2, 1, 1, 3, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 6, 1, 2, 1, 1, 3, 1, 2, 1, 2, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

This sequence is also selfdescriptive, in that each element gives the number of zeros that were removed before it. The indices where the sequence hits a new maximum value (2 at the 2nd position, 3 at the 5th position, 4 at the 13th, 5 at the 34th, etc.) are every second Fibonacci number.


LINKS

Table of n, a(n) for n=0..98.


MATHEMATICA

lowertrim[list_] := DeleteCases[list  1, 0];
Nest[Flatten[Append[#, {ConstantArray[1, #[[Length[lowertrim[#]] + 1]]], #[[Length[lowertrim[#]] + 1]] + 1}]] &, {1, 2}, 15] (* Birkas Gyorgy, Apr 27 2011 *)


CROSSREFS

Cf. A112378, A112379, A112380, A000045, A112382.
Sequence in context: A260533 A107359 A307641 * A277760 A127704 A307662
Adjacent sequences: A112374 A112375 A112376 * A112378 A112379 A112380


KEYWORD

nonn,easy,nice


AUTHOR

Kerry Mitchell, Dec 04 2005


STATUS

approved



