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=2-phi 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 := 1-par ; 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*i-1, {i, t[[n]]}]], {n, 3, 40}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 21 2004
EXTENSIONS
Terms starting at a(52) corrected by R. J. Mathar, Jun 22 2010
STATUS
approved