cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A258051 Fractal sequence derived from A258033.

Original entry on oeis.org

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, 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, 7, 4, 12, 1, 9, 6, 3, 11, 0, 8, 5, 13, 2, 10, 7, 15, 4
Offset: 1

Views

Author

Keywords

Comments

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);
this sequence is fractal, i.e. if the first occurrence of each n is removed, the resulting sequence is the original sequence.

Examples

			Segments of A258033 starting with 0, deleted maxima in brackets:
.   1:  0
.   2:  0 [2] 1
.   3:  0 2 1 [3]
.   4:  0 [5] 2 4 1 3
.   5:  0 5 2 4 1 [6] 3
.   6:  0 [8] 5 2 7 4 1 6 3
.   7:  0 8 5 2 [10] 7 4 1 9 6 3
.   8:  0 8 5 2 10 7 4 1 9 6 3 [11]
.   9:  0 8 5 [13] 2 10 7 4 12 1 9 6 3 11
.  10:  0 8 5 13 2 10 7 4 12 1 9 6 [14] 3 11
.  11:  0 8 [16] 5 13 2 10 7 15 4 12 1 9 6 14 3 11
.  12:  0 8 16 5 13 2 10 [18] 7 15 4 12 1 9 17 6 14 3 11
.  13:  0 8 16 5 13 2 10 18 7 15 4 12 1 9 17 6 14 3 11 [19]
.  14:  0 8 16 5 13 [21] 2 10 18 7 15 4 12 20 1 9 17 6 14 3 11 19
.  15:  0 8 16 5 13 21 2 10 18 7 15 4 12 20 1 9 17 6 14 [22] 3 11 19
		

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a258051 n = a258051_list !! (n-1)
    a258051_list = f (tail a258033_list) where
       f xs = (0 : (delete (maximum ys) ys)) ++ f zs
              where (ys, (_ : zs)) = span (> 0) xs
Showing 1-1 of 1 results.