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

 

Logo
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

%I #14 Apr 07 2019 00:01:30

%S 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,

%T 39,41,16,43,45,47,49,51,53,55,18,57,59,61,63,65,67,69,71,20,73,75,77,

%U 79,81,83,85,87,89,91,22,93,95,97,99,101,103,105,107,109,111,113,115,24

%N 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.

%C 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

%H Lars Blomberg, <a href="/A171087/b171087.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Angelini, <a href="http://www.cetteadressecomportecinquantesignes.com/Runs.htm">Runs</a>

%H E. Angelini, <a href="/A171083/a171083.pdf">Runs</a> [Cached copy, with permission]

%e 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

%p 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

%Y Cf. A171083-A171086.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Sep 07 2010, based on a posting to the Sequence Fans Mailing List by _Eric Angelini_, Aug 23 2010

%E More terms from _R. J. Mathar_ and _John W. Layman_, Sep 09 2010

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 14:02 EDT 2024. Contains 371254 sequences. (Running on oeis4.)