OFFSET
0,4
COMMENTS
Unique values are 0,1,4,6,10,11,17,18,26,27,29,34,40,47,53,57,62,68...
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
Antti Karttunen, Data supplement: n, a(n) computed for n = 0..65536
FORMULA
For m>0, a(2^m+1) = 2^m+2, a(2^m+2) = 2^(m-1)+2, a(2^m+3) = 3*2^m+5, a(2^m+2^(m-1)) = 4, a(2^m-1) = 2^(m+1) - m - 2.
PROG
(PARI) a(n)=if(n<2, n==1, if(n%2, n+a(n-1), a(n/2)))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Ralf Stephan, Oct 27 2013
EXTENSIONS
Name corrected by Gionata Neri, Mar 27 2019
STATUS
approved