This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A082560 a(1)=1, a(n)=2*a(n-1) if n is odd, or a(n)=a(n/2)+1 if n is even. 4
 1, 2, 4, 3, 6, 5, 10, 4, 8, 7, 14, 6, 12, 11, 22, 5, 10, 9, 18, 8, 16, 15, 30, 7, 14, 13, 26, 12, 24, 23, 46, 6, 12, 11, 22, 10, 20, 19, 38, 9, 18, 17, 34, 16, 32, 31, 62, 8, 16, 15, 30, 14, 28, 27, 54, 13, 26, 25, 50, 24, 48, 47, 94, 7, 14, 13, 26, 12, 24, 23, 46, 11, 22, 21, 42, 20 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS b(1)=1, b(n)=2*b(n/2) if n is even, or b(n)=b(n-1)+1 if n is odd produces the sequence of natural numbers. Seen as a triangle read by rows: T(1,1) = 1; T(n+1,2*k-1) = T(n,k)+1 and T(n+1,2*k) = 2*T(n,k)+2, 1 <= k <= 2^n. - Reinhard Zumkeller, May 13 2015 LINKS Reinhard Zumkeller, Rows n = 1..13 of triangle, flattened FORMULA if n is in A010737 : a(n)=n-1 EXAMPLE .  1:                                 1 .  2:                 2                                4 .  3:        3               6                5                10 .  4:    4       8       7       14       6       12       11       22 .  5:  5  10   9  18   8  16  15   30   7  14  13   26  12   24  23   46 PROG (PARI) a(n)=if(n<2, 1, if(n%2, 2*a(n-1), 1+a(n/2))) (Haskell) a082560 n k = a082560_tabf !! (n-1) !! (k-1) a082560_row n = a082560_tabf !! (n-1) a082560_tabf = iterate (concatMap (\x -> [x + 1, 2 * x + 2]))  a082560_list = concat a082560_tabf -- Reinhard Zumkeller, May 13 2015 CROSSREFS Cf. A000079 (row lengths), A033484 (right edges), A166060 (row sums), A232642 (duplicates removed). Sequence in context: A231334 A253609 A300002 * A191598 A283312 A280985 Adjacent sequences:  A082557 A082558 A082559 * A082561 A082562 A082563 KEYWORD nonn,tabf,look AUTHOR Benoit Cloitre, May 04 2003 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 September 17 08:31 EDT 2019. Contains 327127 sequences. (Running on oeis4.)