The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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. 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
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
Sequence in context: A184858 A083026 A047379 * A049039 A325101 A301728
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 21 2004
EXTENSIONS
Terms starting at a(52) corrected by R. J. Mathar, Jun 22 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 23 09:40 EDT 2024. Contains 372760 sequences. (Running on oeis4.)