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.
%I A093848 #14 Aug 11 2015 15:24:14 %S A093848 1,2,4,5,7,9,11,12,14,16,18,20,21,23,25,27,29,31,33,34,36,38,40,42,44, %T A093848 46,48,50,51,53,55,57,59,61,63,65,67,69,71,72,74,76,78,80,82,84,86,88, %U A093848 90,92,94,95,97,99,101,103,105,107,109,111,113,115,117,119,121,122,124 %N A093848 (a(n)) is the earliest monotonic sequence starting with a(1)=1 and satisfying a(n)=length of n-th run of consecutive integers with same parity. %C A093848 There are a(1) odd terms, a(2) even terms, a(3) odd terms, a(4) even terms ... - _Benoit Cloitre_, May 26 2004 %C A093848 A variation on Golomb's sequence A001462. %H A093848 T. D. Noe, <a href="/A093848/b093848.txt">Table of n, a(n) for n=1..1000</a> %F A093848 it seems that a(n) = 2n - a*n^b + o(n^b) where a and b are 2 suitable constants. b=0.4.... Does b=2-phi where phi is the golden ratio? %e A093848 Sequence begins: (1),(2,4),(5,7,9,11),(12,14,16,18,20),(21,.... since the number of elements in each run of odd or even integers is 1, 2, 4, 5, ... the sequence itself. %p A093848 A093848 := proc(nmax) local n,par,a,alast,j ; n := 3 ; par := 1 ; a := [1,2,4] ; while nops(a) < nmax do alast := op(-1,a); if type(alast,'even') = type(par,'even') then ; else alast := alast -1 ; end if; for j from 1 to op(n,a) do a := [op(a), alast+2*j] ; end do: par := 1-par ; n := n+1 ; end do: a ; end proc: A093848(120) ; # _R. J. Mathar_, Jun 22 2010 %t A093848 t={1,2,4}; Do[t=Join[t,Table[t[[-1]]+2*i-1, {i,t[[n]]}]], {n,3,40}] %Y A093848 Cf. A001462, A049039, A169863. %K A093848 nonn %O A093848 1,2 %A A093848 _Benoit Cloitre_, May 21 2004 %E A093848 Terms starting at a(52) corrected by _R. J. Mathar_, Jun 22 2010