Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required. We have a function: $f(n)$ = number of occurrences of the digit $1$ in the numbers from $0$ to $n$. Example: $f(12) = 5$ Question: Which is the next number for which $f(n) = n$? Can I write a program to solve it? – usul Jun 24 '11 at 21:58 1 @S4M: count the 1 in 12 as well. – Isaac Jun 24 '11 at 22:05 1 @Mark: The number in my first comment was meant to stir the pot; I don't think there is another solution.
Read full article from sequences and series - Number of occurrences of the digit 1 in the numbers from 0 to n - Mathematics Stack Exchange
No comments:
Post a Comment