Skip to content / Đến nội dung
ThichHocToan.com

2022 IIMC keystage3-IWYMIC individual Question 6

xIMC · 2022 IIMC keystage3-IWYMIC individual

Question 6

Let $f(n)$ denote the number of occurrences of the digit $2$ in the following positive integer sequence $1,2,3,4,\ldots,n$. For example: $f(23)=7$, as the digit $2$ occurs once in each of the numbers $2,12,20,21,23$ and twice in the number $22$, so $f(23)=5+2=7$. Find a positive integer $n$ such that $f(n)=n$.