login
A269170
a(n) = n OR floor(n/2), where OR is bitwise-OR (A003986).
1
0, 1, 3, 3, 6, 7, 7, 7, 12, 13, 15, 15, 14, 15, 15, 15, 24, 25, 27, 27, 30, 31, 31, 31, 28, 29, 31, 31, 30, 31, 31, 31, 48, 49, 51, 51, 54, 55, 55, 55, 60, 61, 63, 63, 62, 63, 63, 63, 56, 57, 59, 59, 62, 63, 63, 63, 60, 61, 63, 63, 62, 63, 63, 63, 96, 97, 99, 99, 102, 103, 103, 103, 108, 109, 111, 111, 110, 111
OFFSET
0,3
COMMENTS
Fibbinary numbers (A003714) give all integers n >= 0 for which a(n) = A003188(n) and also for which a(n) = A032766(n).
LINKS
FORMULA
a(n) = A003986(n,(n-A000035(n))/2).
Other identities and observations. For all n >= 0:
a(2n) = A163617(n).
A003188(n) <= a(n) <= A032766(n).
PROG
(Scheme)
(define (A269170 n) (A003986bi n (/ (- n (A000035 n)) 2))) ;; Here A003986bi implements dyadic bitwise-OR operation (see A003986).
(PARI) a(n) = bitor(n, n\2); \\ Michel Marcus, Feb 29 2016
(Python)
def A269170(n): return n| n>>1 # Chai Wah Wu, Jun 29 2022
CROSSREFS
Cf. A163617 (even bisection).
Cf. also A003188, A048735, A032766.
Sequence in context: A008867 A185958 A273062 * A003879 A376821 A333885
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 22 2016
STATUS
approved