Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #5 Feb 15 2016 12:19:51
%S 0,0,1,0,2,1,0,2,4,1,3,0,5,2,4,1,3,0,5,2,7,4,1,6,3,0,8,5,2,7,4,1,9,6,
%T 3,0,8,5,2,10,7,4,1,9,6,3,0,8,5,2,10,7,4,12,1,9,6,3,11,0,8,5,13,2,10,
%U 7,4,12,1,9,6,3,11,0,8,5,13,2,10,7,15,4
%N Fractal sequence derived from A258033.
%C The sequence is constructed like A258033 is constructed: after partitioning A258033 into segments starting with 0, in each segment the greatest term is to be deleted (see example);
%C this sequence is fractal, i.e. if the first occurrence of each n is removed, the resulting sequence is the original sequence.
%H Reinhard Zumkeller, <a href="/A258051/b258051.txt">Table of n, a(n) for n = 1..10000</a>
%e Segments of A258033 starting with 0, deleted maxima in brackets:
%e . 1: 0
%e . 2: 0 [2] 1
%e . 3: 0 2 1 [3]
%e . 4: 0 [5] 2 4 1 3
%e . 5: 0 5 2 4 1 [6] 3
%e . 6: 0 [8] 5 2 7 4 1 6 3
%e . 7: 0 8 5 2 [10] 7 4 1 9 6 3
%e . 8: 0 8 5 2 10 7 4 1 9 6 3 [11]
%e . 9: 0 8 5 [13] 2 10 7 4 12 1 9 6 3 11
%e . 10: 0 8 5 13 2 10 7 4 12 1 9 6 [14] 3 11
%e . 11: 0 8 [16] 5 13 2 10 7 15 4 12 1 9 6 14 3 11
%e . 12: 0 8 16 5 13 2 10 [18] 7 15 4 12 1 9 17 6 14 3 11
%e . 13: 0 8 16 5 13 2 10 18 7 15 4 12 1 9 17 6 14 3 11 [19]
%e . 14: 0 8 16 5 13 [21] 2 10 18 7 15 4 12 20 1 9 17 6 14 3 11 19
%e . 15: 0 8 16 5 13 21 2 10 18 7 15 4 12 20 1 9 17 6 14 [22] 3 11 19
%o (Haskell)
%o import Data.List (delete)
%o a258051 n = a258051_list !! (n-1)
%o a258051_list = f (tail a258033_list) where
%o f xs = (0 : (delete (maximum ys) ys)) ++ f zs
%o where (ys, (_ : zs)) = span (> 0) xs
%Y %Cf. A258033, A022328.
%K nonn
%O 1,5
%A _Clark Kimberling_ and _Reinhard Zumkeller_, May 17 2015