The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A049039 Geometric Connell sequence: 1 odd, 2 even, 4 odd, 8 even, ... 8
 1, 2, 4, 5, 7, 9, 11, 12, 14, 16, 18, 20, 22, 24, 26, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 121, 123, 125 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Reinhard Zumkeller, Rows n=1..13 of triangle, flattened R. Stephan, Some divide-and-conquer sequences ... R. Stephan, Table of generating functions FORMULA a(n) = 2n - 1 - floor(log_2(n)). a(2^n-1) = 2^(n+1) - (n+2), the Eulerian numbers a(0)=0, a(2n) = a(n) + 2n - 1, a(2n+1) = a(n) + 2n + 1. - Ralf Stephan, Oct 11 2003 MAPLE Digits := 100: [seq(2*n-1-floor(evalf(log(n)/log(2))), n=1..100)]; MATHEMATICA a[0] = 0; a[n_?EvenQ] := a[n] = a[n/2]+n-1; a[n_?OddQ] := a[n] = a[(n-1)/2]+n; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Dec 27 2011, after Ralf Stephan *) PROG (Haskell) a049039 n k = a049039_tabl !! (n-1) !! (k-1) a049039_row n = a049039_tabl !! (n-1) a049039_tabl = f 1 1 [1..] where    f k p xs = ys : f (2 * k) (1 - p) (dropWhile (<= last ys) xs) where      ys  = take k \$ filter ((== p) . (`mod` 2)) xs -- Reinhard Zumkeller, Jan 18 2012, Jul 08 2011 CROSSREFS Cf. A001614, A033292, A030196, A000295, A050487, A050488. Cf. A160464, A160465 and A160473. - Johannes W. Meijer, May 24 2009 Sequence in context: A083026 A047379 A093848 * A325101 A301728 A005152 Adjacent sequences:  A049036 A049037 A049038 * A049040 A049041 A049042 KEYWORD easy,nonn,nice,tabf AUTHOR EXTENSIONS Keyword tabf added by Reinhard Zumkeller, Jan 22 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 23 22:16 EST 2020. Contains 331177 sequences. (Running on oeis4.)