0
$\begingroup$

As my title says.. what is the formula for kth number whose all digits are even (i.e digits can take 0,2,4,6,8)?

$\endgroup$

1 Answer 1

4
$\begingroup$

Note that the sequence of numbers all of whose digits are even is equivalent to computing in base $5$ with the digits $\{0,2,4,6,8\}$. Consequently, express $k$ in the base $5$ and then (in base $10$) double all its digits. For instance, the $1000^\text{th}$ such number is $1000_{10} = 13000_5 \rightarrow 26000_{10}$.

Is this an inadequate formulation?

$\endgroup$
2
  • $\begingroup$ Thanks dude.. I got it now :) $\endgroup$ Jun 3, 2016 at 23:42
  • $\begingroup$ that was on the tip of my tongue, have a +1 . $\endgroup$
    – Abr001am
    Jun 3, 2016 at 23:43

Not the answer you're looking for? Browse other questions tagged .