2

Question: By which number is $a_{24}$ divisible by?
Where $a_n=\underbrace{999\cdots9 }_{n \text{ times}}$

The solution says the answer is $7$. Here's what is given:

$$a_{24}=\underbrace{999\cdots9 }_{24 \text{ times}}$$ $$=9(\underbrace{\underline{111} \ \ \underline{111}\ \ \underline{111} \ \cdots \ \ \underline{111})}_{8 \text{ similar sets}}$$ Now differences of each set is $0$. Hence $a_{24}$ is divisible by $7$.

Now what I don't understand is what are they implying when they say "difference of each set is $0$" . Also , why does this imply that the number is entirely divisible by $7$?

Also I know the divisibility rule of $7$ to be: Double the last digit, subtract the obtained number from whatever remains after removing the last digit and then check if the final number obtained is divisible by 7.

This process can go lengthy for this question here. Is there any way to solve it quicker?

sai-kartik
  • 2,090
  • Use this duplicate for an easy proof. Note that $24=4\cdot 6$. – Dietrich Burde May 25 '20 at 19:16
  • @DietrichBurde , thanks for the link but I am totally unfamiliar with the stuff used to answer the question. – sai-kartik May 25 '20 at 19:19
  • 2
    Since $7$ divides $1001$, another rule for divisibility by $7$ Involves subtract alternating $3$ digits; for example, $15001$ is divisible by $7$ because $15-1 $ is – J. W. Tanner May 25 '20 at 19:21
  • 1
    "but I am totally unfamiliar with the stuff used" That seems like a good place to start then. Prove or learn the proof that $x^{p-1}\equiv 1\pmod{p}$ for every prime $p$ and $x$ coprime to $p$. Then, use the result. – JMoravitz May 25 '20 at 19:21
  • "By which number"? Yes, it's divisible by $7$, but also by $3$, $9$, $11$, $13$, and many others. – Robert Israel May 25 '20 at 19:25
  • @RobertIsrael but the options were stated: 24, 12 , 7 and 31 so I bothered to ask only for 7 – sai-kartik May 25 '20 at 19:27
  • Also I appreciate everyone helping me here and sorry for not mentioning this sooner, but I'm still a student in 12th grade and I haven't learnt any of this stuff. However, I now know where to begin – sai-kartik May 25 '20 at 19:28

3 Answers3

2

To address what you don’t understand about the solution given, you should become aware that there is another rule for divisibility by $7$ besides the one you mentioned. This rule is to alternately add and subtract $3$-digit chunks of the number starting with the last $3$ digits and testing whether the result is divisible by $7$. For example, $7003010$ is divisible by $7$ because $10-3+7$ is. This rule works because $7$ divides $1001.$ (By the way, it works for $11$ and $13$ too.) Using this rule, it becomes obvious that any number written as a string of $n$ $1$s, where $n$ is a multiple of $6$, is divisible by $7$.

J. W. Tanner
  • 60,406
1

Observe that $$a_n=\dfrac{10^n-1}{10-1},n\ge1$$

Now as $(10,7)=1$ and $\phi(7)=6$

$7$ will definitely divide $10^n-1$ if $6$ divides $n$

Again as $(10-1,7)=1,7$ will divide $a_n$ if $6$ divides $n$

1

I think the text is a assuming a different divisible by $7$ rule. (The rule that J.W. Tanner pointed out in the comments.)

If you have a number that is $3k$ digits long $N= a_kb_kc_ka_{k-1}b_{k-1}c_{k_1}.....a_2b_2c_2a_1b_1c_1$ (you can add zeros to make it $3k$ digits long) you do

$M = a_kb_kc_k - a_{k-1}b_{k_1}c_{k_1} + ...... $ and seeing if $7$ divides $M$.

For example:

To find out if $42405231722$ is divisible by $7$ we take $-42+405 - 231+722 = 363 + 491=854$ and $854$ divided by $7$ is $122$ with no remainder so it is divisible by $7$.

So for $N= 111,111,111,111,111,111,111,111$ we take $111-111 + 111-111+111-111 + 111 -111 = 0$ so $N$ is divisible by $7$.

Why does the rule work?

Well $1001 = 7*143$ so $abcdef = abc*1000 + def = abc*1001 + def-abc = 7(abc*143) + (def-abc)$ so $abcdef$ will have the same remainder when divided by $7$ and $def-abc$.

So $-42+405 - 231+722$ has the same remainder as $42405 + 231722$ what has the same remainder as $-42405*1000 + 231722$ which has the same remainder as $42405*10^6 + 231722=42405231722$.

.....

All said and done this is not a good way to do it.

Better to note that $10^{ab} - 1 = (10^a-1)(10^{ab-b} + 10^{ab-2b} + .... + 10^b + 1)$ so $10^a -1|10^{ab}-1$ and then if $a$ is a prime other than $2$ and $5$ then $a|10^a-1$ and $a|10^{ab}-1$.

So $7|10^6-1 = 999,999$ and so $7|10^{24}-1 = (10^6-)(10^{18} + 10^{12} + 10^6 + 1)$.

fleablood
  • 124,253