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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A301572 a(n) = distance from n to nearest Fibbinary number (A003714). 1
0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 3, 2, 1, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 3, 2, 1, 0, 0, 0, 1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,13
COMMENTS
This sequence is unbounded.
LINKS
FORMULA
a(n) = 0 iff n belongs to A003714.
0 <= 2 * a(n) - a(2 * n) <= 1.
EXAMPLE
a(12) = a(14) = 2 because 10 is the nearest Fibbinary number to 12 and 16 is the nearest Fibbinary number to 14.
PROG
(PARI) a(n) = for (k=0, oo, if (bitand(n-k, 2*(n-k))==0 || bitand(n+k, 2*(n+k))==0, return (k)))
CROSSREFS
Cf. A003714.
Sequence in context: A049336 A017888 A017878 * A017868 A353158 A334476
KEYWORD
nonn,base,look
AUTHOR
Altug Alkan and Rémy Sigrist, Mar 23 2018
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 06:16 EDT 2024. Contains 371782 sequences. (Running on oeis4.)