Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a problem in A Concise Introduction to Pure Mathematics 3rd Ed under the counting and choosing chapter. It is a multipart question and I am stuck on the last part:

'The digits 1 2 3 4 5 6 are written in some order to form a six digit number'.


d) How many are divisible by $8$? (Hint: first show that the remainder on dividing a six digit number $abcdef$ by 8 is $4d + 2e + f$)

I know there are 720 different permutations from a previous question, and I realised that only the last three digits affect divisibility by 8 as $8 * 125 = 1000$, so the final answer will be $3!x$ where $x$ is the number of permutations of the last three digits that are divisible by 8.

In terms of the hint it was simple to use long division to establish $\frac{100d + 10e + f}{8} = 12d + e$ with a remainder $4d + 2e + f$. For this remainder to be divisible by 8, I can see that $f$ must also be even. I just can't make the last step, can anyone please give me a hint (would prefer not to be given the actual answer if possible!).

share|cite|improve this question
I wuld break the problem into two case: consider $e$ even and $e$ odd, and analyse these cases separately. The case $e$ is even is quite restrictive. – Geoff Robinson May 29 '14 at 12:10
I would say $100d + 10e + f = 8(12d + e) + 4d + 2e + f$, so $100d + 10e + f \equiv 4d + 2e + f \mod 8$. – NovaDenizen May 29 '14 at 13:10
Since this is the fourth in a multi-part question, can you use the other answers to solve this one? – NovaDenizen May 29 '14 at 13:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.