

A171087


A "run" means a maximal string of numbers that includes exactly one even number; this sequence has the property that the sequence of run lengths is the sequence itself and all natural numbers appear exactly once.


2



2, 1, 4, 6, 3, 5, 7, 8, 9, 11, 13, 15, 17, 10, 19, 21, 12, 23, 25, 27, 29, 14, 31, 33, 35, 37, 39, 41, 16, 43, 45, 47, 49, 51, 53, 55, 18, 57, 59, 61, 63, 65, 67, 69, 71, 20, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 22, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 24
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

The rule of construction is: each of the even numbers e(k) = 2*k = 2, 4, 6, 8, 10, ... starts a run of numbers that contains e(k) and a(k)1 odd numbers not used so far.  R. J. Mathar, Sep 09 2010


LINKS

E. Angelini, Runs [Cached copy, with permission]


EXAMPLE

Blocks with run lengths of 2, 1, 4, etc. are (2,1), (4), (6,3,5,7), (8,9,11,13,15,17), (10,19,21), (12,23,25,27,29), ...  R. J. Mathar, Sep 09 2010


MAPLE

A171087 := proc(n) a := [2, 1] ; modd := 1 ; for p from 2 do rl := op(p, a) ; ev := 2*p ; a := [op(a), ev] ; for o from modd+2 to modd+2*(rl1) by 2 do a := [op(a), o] ; modd := o ; end do: if nops(a) > n then print(a) ; return; end if; end do: end proc: A171087(100) ; # R. J. Mathar, Sep 09 2010


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



