2

Let $a_{1}=24$ and form the sequence $a_{n}, n \geq 2$ by $a_{n}=100 a_{n-1}+134 .$ The first few terms are $$ 24,2534,253534,25353534, \ldots $$ What is the least value of $n$ for which $a_{n}$ is divisible by $99 ?$

We have to find. $a_n \equiv 0\pmod{99}$ $$ a_n=100a_{n-1}+134 \\ \implies a_n-a_{n-1}\equiv 35 \pmod{99}$$

Now how do I proceed from here? I Concluded some results, verified for smaller values, which proved to be wrong. How does doing this get me the $n$? Or am I even correct to proceed like this?

The (unofficial) solution isn't very good either:

$a_{3}=253534 \\ a_{4}=25353534 \\ \therefore a_{n}=2 \underbrace{535353 \ldots 53}_{(n-1) \text { Times } 53}4$

Now, $a_n \rightarrow$ divisible by $99 \Rightarrow$ by $\ 9 \ \& \ 11$ both.

Sum of digits $=6+8(n-1)$

To be divisible by 9 $\mathrm{n}=7,16,25,34,43,52,61,70,79,88, \ldots$

$a_{7}=2\underbrace{535353535353 }_{6 \text { Times } 53} 4$

But $a_{7} \rightarrow$ Not divisible by 11 .

$a_{16}=2\underbrace{5353535353 \ldots \ldots 53 }_{15 \text { Times } 53}4$

Similarly, $a_{16} \rightarrow$ Not divisible by 11 .

Now, $n=88$

$a_{88}=2 \underbrace{5353 \ldots \ldots 53}_{87 \text { Times } 53}4$

Divisibility by $11 \rightarrow|(2+3+3 \ldots \ldots)-(5+5+\ldots+ 4)|$ $$ \begin{array}{l} =|263-439| \\ =176 \end{array} $$ $\therefore$ Least $n=88$

Hints are more appreciated than the solution.

UmbQbify
  • 889
  • 1
    One not extra bright method is to apply the recursion repeatedly, $a_{n}=100 a_{n-1}+134=100 (100a_{n-2}+134)+134=100^2a_{n-2}+100\cdot 134+134$. Can you express $a_n$ in terms of $a_{n-3}$, $a_{n-4}$, or more generally $a_{n-k}$? How about $a_1$? Can the resulting form be simplified modulo $99$? – Sil Jul 31 '20 at 06:33
  • @Sil, I don't dare to do that because it quickly gets messy. But I'll try it. – UmbQbify Jul 31 '20 at 06:35
  • 1
    It's not that bad if you keep only first and last two terms for example, especially modulo $99$ it simplifies ;) Actually, you can already perform this method with congruences from the start. But yea, there are better methods. – Sil Jul 31 '20 at 06:38

2 Answers2

4

Your method can work quite well. For all $1 \lt i \le n$, note $a_i - a_{i-1}\equiv 35 \pmod{99}$ means each $a_i$ is congruent to $35$ more than the previous one of $a_{i-1}$. Thus, starting from $a_1$ and repeating this $n - 1$ times, you get

$$a_n \equiv a_1 + (n - 1)35 \equiv 35n - 11 \equiv 0 \pmod{99} \tag{1}\label{eq1A}$$

Since $99 = 9(11)$, you can split \eqref{eq1A} into

$$35n - 11 \equiv 0 \pmod{9} \implies 8n - 2 \equiv 0 \pmod{9} \implies 4n \equiv 1 \pmod{9} \tag{2}\label{eq2A}$$ $$35n - 11 \equiv 0 \pmod{11} \implies 2n \equiv 0 \pmod{11} \implies n \equiv 0 \pmod{11} \tag{3}\label{eq3A}$$

Note \eqref{eq3A} means $n = 11k, \; k \in \mathbb{Z}$. You can thus use this to determine $k$ from \eqref{eq2A}.

John Omielan
  • 47,976
  • Yeah, I came to that result, in a simpler sequence that I made myself. But I couldn't solve it further so I left it. ( I had $a_n\equiv 8n-4 \pmod 9$). Also, why is $n\equiv 0 \pmod {11}$? Shouldn't it be $2n \equiv 0$? – UmbQbify Jul 31 '20 at 06:33
  • 1
    You asked for only a hint, but I've added some more details. Note $2n \equiv 0 \pmod{11}$ means $n \equiv 0 \pmod{11}$. This is because $2n \equiv 0 \pmod{11}$ means $11 \mid 2n$. As $11$ doesn't divide $2$, it must divide $n$. Also, as for solving it further, you should have got $a_n \equiv 8n - 2 \pmod{9}$ (which I've further simplified to $4n \equiv 1 \pmod{9}$) instead of $a_n \equiv 8n - 4 \pmod{9}$. You seem to have made a small mistake. Note the $- 11$ comes from $24 - 35$, and $-11 \equiv -2 \pmod{9}$. This quite likely explains why you couldn't get the correct answer. – John Omielan Jul 31 '20 at 06:42
1

Claim 1: a number is divisible by $9$ if and only if the sum of its digits (written in base $10$) is $0\pmod 9$.

Proof: if $n=\sum_{k=0}^md_k10^k$, then since $10^k\equiv 1\pmod 9$, we have $n\equiv \sum_{k=0}^m d_k\pmod 9$. Thus $9$ divides $n$ if and only if $9$ divides $\sum_{k=0}^md_k$.

Claim 2: a number is divisible by $11$ if and only if the alternating sum of its digits is $0\pmod {11}$.

Proof: the same thing, but now $10^k\equiv (-1)^k\pmod{11}$.

Now $a_n$ is divisible by $99$ if and only if it is divisible by $9$ and $11$, and the sequence is designed so we can easily tell what the digits are. Writing $b_n$ for the sum of the digits of $a_n$, we have

$$b_2=7+7, b_3=7+8+7,b_4=7+8+8+7,$$

etc. Mod $9$, each successive term subtracts one. Inductively, one sees that $a_n$ is divisible by nine if and only if $n=9k+7$ for some $k$.

Now let $c_n$ be the alternating sum of the digits. We have

$$c_2=2-5+3-4,c_3=2-5+3-5+3-4,$$ etc. In other words,

$$c_2=-4,c_3=-6,c_4=-8,$$ etc. Inductively, $c_n=-2n$, and $a_n$ is divisible by $11$ if and only if $n=11k$.

All together, $a_n$ is divisible by $99$ if and only if $n\equiv 7\pmod 9$ and $n\equiv 0\pmod {11}$. It is then straightforward to use the Euclidean algorithm to find the set of solutions $\{88+99k:k\in\Bbb Z\}$.

pancini
  • 19,216
  • I understood the whole solution, except for n=9k+7. I get that $b_1\equiv6,b_2\equiv 5 \ldots \pmod 9$. Once the remainders are negative, it'll start over from 9. So how is $n=9k+7$? – UmbQbify Jul 31 '20 at 06:51
  • 1
    The first time $b_n$ is divisible by $9$ is $b_7$ since $b_7\equiv 0$. After that, the next is $b_{16}$, etc. – pancini Jul 31 '20 at 18:56
  • got it. Another great solution! – UmbQbify Jul 31 '20 at 19:32