OFFSET
1,1
COMMENTS
a(n) = b(n+1), with b(2n) = 2b(n), b(2n+1) = 2b(n)+2+4[n==0]. - Ralf Stephan, Oct 11 2003
LINKS
Yifan Xie, Table of n, a(n) for n = 1..10001 (first 1000 terms from Harvey P. Dale)
Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
Benoit Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
Ralf Stephan, Some divide-and-conquer sequences ...
Ralf Stephan, Table of generating functions
FORMULA
a(n) = 2^floor(log_2(4*n))+2*n. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
a(n) = (2^(floor(log_2(n))+1)+n)*2. - Klaus Brockhaus, Feb 23 2003
a(2n) = 2a(n), a(2n+1) = 2a(n) + 2 + 4[n==0]. Twice A004755. - Ralf Stephan, Oct 12 2003
MATHEMATICA
Table[Union[FromDigits[Join[{1, 1}, #, {0}], 2]&/@Tuples[{1, 0}, n]], {n, 0, 5}]//Flatten (* Harvey P. Dale, Jan 16 2018 *)
PROG
(PARI) for(n=0, 6, for(k=2^(n-1), 2^n-1, print1((2^n+k)*2, ", ")))
(PARI) for(n=1, 59, print1((2^(floor(log(n)/log(2))+1)+n)*2, ", "))
(PARI) a(n) = n*2 + 4<<logint(n, 2); \\ Ruud H.G. van Tol, May 10 2024
(Python)
def A079946(n): return n+(1<<n.bit_length())<<1 # Chai Wah Wu, Jul 13 2022
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
N. J. A. Sloane, Feb 21 2003
EXTENSIONS
Definition clarified by N. J. A. Sloane, May 10 2024
STATUS
approved