In the decimal system of numeration the number of $6$-digit numbers in which the sum of the digits is divisible by $5$ is $$(A)\space180000 \space\space(B) \space540000\space\space (C) \space 5\times10^5\space \space (D) \space \text{none}$$

First, I noted that $a+b+c+d+e+f=5,10,15\dots50$ where $a\geq1$ and $ b, c, d, e, f\geq0$.

From this I got $9C5 + 14C5 +...... 54C5$, which is just too hectic too calculate and I don't know it will give the right answer or not.

Then I observed that there are $900000$ total possible numbers and if I divide it by $5$, I will get the correct answer which is $180000$.

Is it a coincidence or is there any logic to it? What would be the proper method to solve this?

  • 1
    $\begingroup$ is 000005 a six-digit number, as that term is intended in the formulation of the question? $\endgroup$ – C. M. Sperberg-McQueen Oct 6 '17 at 18:29

Hint Suppose you have specified the first five digits of a six-digit number. How many choices are there for the sixth digit such that the sum of all six digits is divisible by $5$?


Disclaimer: sorry, wrong approach as shown in comments.

It is no coïncidence.

If $n$ is a 6-digits integer and $S(n)$ is the sum of its digits, you will notice that $S(n+1) mod 5 = (S(n) mod 5) +1$

Moreover, as you noticed, the number of 6-digits integers is a multiple of $5$

Hence exactly one fifth of all 6-numbers integers will have a sum of digits that equals $1$ modulo $5$: They are $100000,100005,...,100000+5k,..., 999996$.

One fifth of them will have a sum of digits that equals $2$ modulo $5$, one fifth will have a sum of digits that equals $3$ modulo $5$, one fifth will have a sum of digits that equals $4$ modulo $5$, and finally one fifth will have a sum of digits that equals $0$ modulo $5$, hence be multiples of 5.

They are $100004,100009,...,100004+5k,..., 999995$.

  • 1
    $\begingroup$ You're correct that exactly a fifth of all $6$-digit numbers are divisible by $5$, but your reasoning is incorrect. If I set $k=2$ in your latter sequence, then I get $100004 + 10 = 100014$, whose digits sum to $6$, which is not divisible by $5$. @Travis has the correct approach. $\endgroup$ – T. Linnell Oct 6 '17 at 15:23
  • $\begingroup$ Just curious - is there a reason for the ï in coïncidence instead of a regular i? $\endgroup$ – Digital Trauma Oct 6 '17 at 17:14
  • $\begingroup$ @DigitalTrauma it's a coïncidence $\endgroup$ – RiaD Oct 6 '17 at 17:49
  • $\begingroup$ Some people add umlauts to indicate that two vowels are to be pronounced separately instead of together. Without the umlaut (and a first grade education), you might mistakenly pronounce the first syllable in coincidence as "coin". Also not uncommon in cooperate, reentry, etc. In my view it's unnecessary and pretentious. $\endgroup$ – BallpointBen Oct 6 '17 at 17:51
  • $\begingroup$ - The "ï" in "coïncidence" is due to your's truly being French. And French is such a pretentious language that it's how it spells that​ word. If this is my single English mistake in my answer, I will feel very proud about it. - The math mistake pointed by Linnell is much more embarrassing. I'll edit but I stand ashamed. $\endgroup$ – Evargalo Oct 6 '17 at 18:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.