The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A374356 a(n) is the greatest fibbinary number f <= n such that n - f is also a fibbinary number whose binary expansion has no common 1's with that of f (where fibbinary numbers correspond to A003714). 4
 0, 1, 2, 2, 4, 5, 4, 5, 8, 9, 10, 10, 8, 9, 10, 10, 16, 17, 18, 18, 20, 21, 20, 21, 16, 17, 18, 18, 20, 21, 20, 21, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 32, 33, 34, 34, 36, 37, 36, 37, 40, 41, 42, 42, 40, 41, 42, 42, 64, 65, 66, 66 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS To compute a(n): replace every other bit with zero (starting with the second bit) in each run of consecutive 1's in the binary expansion of n. LINKS Rémy Sigrist, Table of n, a(n) for n = 0..8191 Index entries for sequences related to binary expansion of n FORMULA a(n) = A374354(n, A277561(n)-1). a(n) = n - A374355(n). a(n) <= n with equality iff n is a fibbinary number. EXAMPLE The first terms, in decimal and in binary, are: n a(n) bin(n) bin(a(n)) -- ---- ------ --------- 0 0 0 0 1 1 1 1 2 2 10 10 3 2 11 10 4 4 100 100 5 5 101 101 6 4 110 100 7 5 111 101 8 8 1000 1000 9 9 1001 1001 10 10 1010 1010 11 10 1011 1010 12 8 1100 1000 13 9 1101 1001 14 10 1110 1010 15 10 1111 1010 16 16 10000 10000 PROG (PARI) a(n) = { my (v = 0, e, x, y, b); while (n, x = y = 0; e = valuation(n, 2); for (k = 0, oo, if (bittest(n, e+k), n -= b = 2^(e+k); [x, y] = [y + b, x], v += x; break; ); ); ); return (v); } CROSSREFS Cf. A003714, A277561, A374354, A374355. Sequence in context: A292271 A292593 A332995 * A214793 A199088 A293974 Adjacent sequences: A374353 A374354 A374355 * A374357 A374358 A374359 KEYWORD nonn,base AUTHOR Rémy Sigrist, Jul 06 2024 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 12 11:23 EDT 2024. Contains 375850 sequences. (Running on oeis4.)