# Number $f(x)$ whose representation in base 3 is the binary representation of $x$: when does $x$ divide $f(x)$?

For any natural number $$x$$, let $$f(x)$$ be the natural number whose representation in base 3 is the same as the binary representation of $$x$$ (for instance, $$f(5)=10$$ because $$5=101_2$$ and $$101_3=10$$). Are there infinitely many $$x$$ such that $$f(x)$$ is a multiple of $$x$$? What about the odd ones among them? Besides the numbers 1 and 49091, are there other natural numbers $$x$$ of the considered kind such that $$f(x)$$ is odd (i.e. such that the binary representation of $$x$$ contains an odd number of 1's)?

An additional question (concerning a possible upper bound for the considered numbers): are there natural numbers $$x$$ greater than $$2^{36}$$ such that $$f(x)$$ is a multiple of $$x$$? (An $$x$$ between $$2^{35}$$ and $$2^{36}$$ with the considered property is indicated in my comment of August 9, 2019; if the comment is not displayed correctly please look at https://store.fmi.uni-sofia.bg/fmi/logic/skordev/Aug-comments.pdf).

1. An answer to the above additional question can be found in my third comment of November 25, 2019 (if the comment in question is not displayed correctly please look at the second of my later comments). A number greater than $$2^{41}$$ and having the property in question is indicated there.
2. Among the nine numbers $$x$$ with $$x\!\mid\!f(x)$$ which have been added by Giovanni Resta in December 2019, there are two with odd values of $$f(x)$$, namely the numbers 7603017182731 and 35401601113345.
• A computer search fails to find any other instances with $x\le 2^{32}$. – TonyK Jun 30 '19 at 2:00
• You said "such that $f(x)$ is odd", which seemed clear to me. – TonyK Jul 5 '19 at 23:01
• Basically, you are asking whether there are infinitely many $(k+1)$-tuples $(c_0,c_1,\dotsc,c_k)\in\{0,1\}^{k+1}$ such that $c_k2^k+\dotsb+2c_1+c_0$ is a divisor of $c_k3^k+\dotsb+3c_1+c_0$, correct? – Seva Aug 6 '19 at 16:25