# Weighing the integers

$W(n) = \displaystyle \sum_{k=1}^{\lfloor\log n\rfloor + 1}\left( 2^k\left\lfloor\frac{n \pmod{10^k}}{10^{k-1}}\right\rfloor\right).$

Define the weight of a positive integer $$n$$ as above.

Without a calculator (of course), find the last three digits of the largest positive integer $$\tau \in \left(0,10^5\right)$$ that satisfies $$16\cdot W(\tau) = \tau$$.

Note. This is the easy semi-bashy version; if I ever get around to it, I will post my other version.

×