For each positive integer $ n$, define $ f(n)$ as the number of digits $ 0$ in its decimal representation. For example, $ f(2)=0$, $ f(2009)=2$, etc. Please, calculate \[ S=\sum_{k=1}^{n}2^{f(k)},\] for $ n=9,999,999,999$. Yudi Satria, Jakarta
Problem
Source: Indonesia IMO 2010 TST, Stage 1, Test 2, Problem 4
Tags: combinatorics proposed, combinatorics