কোনো ধনাত্মক পূর্ণসংখ্যা $n$-এর জন্য $g(n)$ দিয়ে আমরা তার অঙ্কগুলোর যোগফলকে বোঝাই। কোনো ধনাত্মক পূর্ণসংখ্যা $x$-এর জন্য $g(x),g(g(x)),g(g(g(x))),\cdots$ সিকোয়েন্সেরটার কথা চিন্তা করো। একসময় এই সিকোয়েন্সের পদগুলো আর পরিবর্তিত হবে না। সেই অবস্থায় সিকোয়েন্সের পদগুলো যে সংখ্যাটার সমান হবে, সেটার নাম দাও $f(x)$। কতগুলো ধনাত্মক পূর্ণসংখ্যা $a\leq2021$ আছে যেন $f(a)=9$ হয়?
For a positive integer $n$, let $g(n)$ be the sum of its digits. For a positive integer $x$, consider the sequence $g(x),g(g(x)),g(g(g(x))),\cdots$. At some point, this sequence will eventually be a constant. Denote that constant by $f(x)$. Find the number of positive integers $a\leq2021$ such that $f(a)=9$.
BdMO National 2021 Primary Problem 5
- Anindya Biswas
- Posts:264
- Joined:Fri Oct 02, 2020 8:51 pm
- Location:Magura, Bangladesh
- Contact:
"If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is."
— John von Neumann
— John von Neumann
- Anindya Biswas
- Posts:264
- Joined:Fri Oct 02, 2020 8:51 pm
- Location:Magura, Bangladesh
- Contact:
Re: BdMO National 2021 Primary Problem 5
In decimal system, we can write a number $n$ as \[n=a_0+a_1\cdot10+a_2\cdot10^2+\cdots+a_k\cdot10^k\] where $a_0,a_1,a_2,\cdots a_k\in\{0,1,2,\cdots,9\}$ and $a_k\neq0$.
Then
\[
\begin{equation}
\begin{split}
g(n)&=a_0+a_1+a_2+\cdots+a_k \\
\therefore n-g(n)&=(10^0-1)a_0+(10^1-1)a_1+(10^2-1)a_2+\cdots+(10^k-1)a_k\\
\Longrightarrow n-g(n)&\equiv0\pmod{9}\\
\Longrightarrow n&\equiv g(n)\pmod{9}\\
\Longrightarrow n&\equiv f(x)\pmod{9}
\end{split}
\end{equation}
\]
$\therefore f(a)=9$ iff $a\equiv0\pmod{9}$ where $a$ is a positive integer.
Number of such integers, \[\boxed{\lfloor\frac{2021}{9}\rfloor=224}\]
Then
\[
\begin{equation}
\begin{split}
g(n)&=a_0+a_1+a_2+\cdots+a_k \\
\therefore n-g(n)&=(10^0-1)a_0+(10^1-1)a_1+(10^2-1)a_2+\cdots+(10^k-1)a_k\\
\Longrightarrow n-g(n)&\equiv0\pmod{9}\\
\Longrightarrow n&\equiv g(n)\pmod{9}\\
\Longrightarrow n&\equiv f(x)\pmod{9}
\end{split}
\end{equation}
\]
$\therefore f(a)=9$ iff $a\equiv0\pmod{9}$ where $a$ is a positive integer.
Number of such integers, \[\boxed{\lfloor\frac{2021}{9}\rfloor=224}\]
"If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is."
— John von Neumann
— John von Neumann