The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 Lars Blomberg, Table of n, a(n) for n = 1..10000 Eric Angelini, Runs 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*(rl-1) 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 Cf. A171083-A171086. Sequence in context: A262930 A293387 A306015 * A105364 A180405 A171007 Adjacent sequences: A171084 A171085 A171086 * A171088 A171089 A171090 KEYWORD nonn AUTHOR N. J. A. Sloane, Sep 07 2010, based on a posting to the Sequence Fans Mailing List by Eric Angelini, Aug 23 2010 EXTENSIONS More terms from R. J. Mathar and John W. Layman, Sep 09 2010 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.

Last modified June 2 21:57 EDT 2023. Contains 363101 sequences. (Running on oeis4.)