OFFSET
0,2
COMMENTS
This sequence has similarities with A261891; here we divide and round down, there we multiply, in order to obtain a number with no common bit with the original.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..8192
FORMULA
a(n) = 2 iff n is a positive Fibbinary number (A003714).
EXAMPLE
For n = 3:
- 3 AND floor(3/1) = 3,
- 3 AND floor(3/2) = 1,
- 3 AND floor(3/3) = 1,
- 3 AND floor(3/4) = 0,
- hence a(3) = 4.
PROG
(PARI) a(n) = for (k=1, oo, if (bitand(n, n\k)==0, return (k)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 03 2020
STATUS
approved