

A062050


nth chunk consists of numbers 1 ... 2^n.


14



1, 1, 2, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

A005836(a(n+1)) = A107681(n).  Reinhard Zumkeller, May 20 2005
a(k) is the distance between k and the largest power of 2 not exceeding k, where k=n+1. {Consider the sequence of even numbers <= k; after sending the first term to the last position delete all oddindexed terms; the final term that remains after iterating the process is the a(k)th even number.}  Lekraj Beedassy, May 26 2005
Triangle read by rows in which row n lists the first 2^(n1) positive integers, n >= 1, see example.  Omar E. Pol, Sep 10 2013


LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
R. Stephan, Some divideandconquer sequences ...
R. Stephan, Table of generating functions


FORMULA

a(n) = A053645(n) + 1.
a(n) = n  msb(n) + 1 (where msb(n) = A053644(n)).
a(n) = 1+floor(n2^floor(log(n)/log(2))).  Benoit Cloitre, Feb 06 2003
G.f.: 1/(1x) * ((1x+x^2)/(1x)  Sum_{k>=1} 2^(k1)*x^2^k).  Ralf Stephan, Apr 18 2003
a(1) = 1, a(2n) = 2a(n)  1, a(2n+1) = 2a(n).  Ralf Stephan, Oct 06 2003
a(n) = if n < 2 then n else 2*a(floor(n/2))  1 + n mod 2.  Reinhard Zumkeller, May 07 2012


EXAMPLE

From Omar E. Pol, Aug 31 2013: (Start)
Written as irregular triangle with row lengths A000079:
1;
1,2;
1,2,3,4;
1,2,3,4,5,6,7,8;
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;
...
Row sums give A007582.
(End)


MATHEMATICA

Flatten[Table[Range[2^n], {n, 0, 6}]] (* Harvey P. Dale, Oct 12 2015 *)


PROG

(PARI) a(n)=floor(n+12^floor(log(n+110^27)/log(2)))
(Haskell)
a062050 n = if n < 2 then n else 2 * a062050 n' + m  1
where (n', m) = divMod n 2
 Reinhard Zumkeller, May 07 2012


CROSSREFS

Cf. A053644, A053645.
Cf. A092754.
Sequence in context: A194103 A074294 A168265 * A233782 A233972 A169778
Adjacent sequences: A062047 A062048 A062049 * A062051 A062052 A062053


KEYWORD

nonn


AUTHOR

Marc LeBrun, Jun 30 2001


EXTENSIONS

Cloitre's formula corrected (formula was off by 1 and used offset 0 instead of 1) by Joseph Biberstine (jrbibers(AT)indiana.edu), Nov 25 2008


STATUS

approved



