0

Let $n$ be an integer with $9\mid n$.

Let's write $n=\sum_{i=0}^{\infty} a_i 10^i$ where the $a_i$ are numbers from $0$ to $9$, and almost all of them $0$, and let's define: $$f(n)=\sum_{i=0}^{\infty} a_i.$$ Then there exists some $k\in\mathbb{N}$ such that $f^k(n)=9$.

Is this true? If it's true, how can I prove it? If it's false how can a counterexample be found?

  • 1
    First prove that $f(n) \leq n$ for all n, and $f(n)<n$ if $n>10$. Then prove that $9$ is always a multiple of $n-f(n)$. – Sarvesh Ravichandran Iyer Aug 09 '16 at 01:24
  • It's true. And if you can prove the digits of a multiple of 9 is a multiple of 9, then ultimately has to happen by induction. The number is sum 10^k ak, and the sum of the digits is sum ak. The difference is sum 999...99 ak. So either they are both multiples of 9 or neither are. – fleablood Aug 09 '16 at 04:53
  • This is the algorithm that was taught to me in elementary school under the name “Casting Out Nines” (you can look it up under just this name in Wikipedia). It’s really a pity that it seems no longer to be taught to kids. – Lubin Aug 09 '16 at 16:04

1 Answers1

1

Fleshing out the hint by астон вілла олоф мэллбэрг in the comments:

Note that $$n-f(n) = \sum_{i=1}^\infty (10^i-1) a_i = 9 a_1 + 99 a_2 + 999 a_3 + \cdots $$ is divisible by $9$ and is strictly positive as long as $n>10$. [Otherwise, $n=9$ in which case $f^k(9)=9$ for all $k$.]

So, by iterating this procedure from $n>10$, we get a strictly decreasing sequence $n,f(n),f^2(n),\ldots$ of multiples of $9$. The sequence must therefore terminate at $9$.

angryavian
  • 89,882