

A093848


(a(n)) is the earliest monotonic sequence starting with a(1)=1 and satisfying a(n)=length of nth run of consecutive integers with same parity.


7



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, 46, 48, 50, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 122, 124
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

There are a(1) odd terms, a(2) even terms, a(3) odd terms, a(4) even terms ...  Benoit Cloitre, May 26 2004
A variation on Golomb's sequence A001462.


LINKS

T. D. Noe, Table of n, a(n) for n=1..1000


FORMULA

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=2phi where phi is the golden ratio?


EXAMPLE

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.


MAPLE

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 := 1par ; n := n+1 ; end do: a ; end proc: A093848(120) ; # R. J. Mathar, Jun 22 2010


MATHEMATICA

t={1, 2, 4}; Do[t=Join[t, Table[t[[1]]+2*i1, {i, t[[n]]}]], {n, 3, 40}]


CROSSREFS

Cf. A001462, A049039, A169863.
Sequence in context: A184858 A083026 A047379 * A049039 A005152 A060831
Adjacent sequences: A093845 A093846 A093847 * A093849 A093850 A093851


KEYWORD

nonn


AUTHOR

Benoit Cloitre, May 21 2004


EXTENSIONS

Terms starting at a(52) corrected by R. J. Mathar, Jun 22 2010


STATUS

approved



