Take the 2-minute tour ×
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.

How many 4 digit numbers are multiples of 4 no matter how you permute them? (base 10)

share|improve this question
1  
What have you tried? –  JSchlather Jan 21 '13 at 1:19
    
Nothing very useful. factorizing the 4 outside. to make it look like a number a*4. –  Bananarama Jan 21 '13 at 1:19
1  
Probably useful: A number is divisible by four if and only if the last two digits represent a number that is divisible by four. –  Austin Mohr Jan 21 '13 at 1:21
    
$4044$ is divisible by $4$. Does $0444$ count as a permutation? –  Henry Jan 21 '13 at 7:34
    
yes it does. It does not say the premutation needs to be also 4 digits. –  Bananarama Jan 22 '13 at 23:36

3 Answers 3

up vote 10 down vote accepted

A number written in base ten is a multiple of $4$ if and only if the two-digit number formed by its last two digits is a multiple of $4$. If these two digits are $ab$ in that order, clearly $b$ must be even. It’s not hard to verify that if $b$ is a multiple of $4$ (i.e., $0,4$, or $8$), then the two-digit number $ab$ is a multiple of $4$ if and only if $a$ is even, while if $b\equiv2\pmod 4$ (i.e., $2$ or $6$), then $ab$ is a multiple of $4$ if and only if $a$ is odd.

Now suppose that you have your four-digit number $n$ whose permutations are all multiples of $4$. Clearly $n$ cannot contain an odd digit, so it also cannot contain a digit $2$ or $6$. We conclude that all four digits must be multiples of $4$, i.e., must be $0,4$, or $8$. Now just count the four-digit numbers that can be formed from these three digits, being careful to exclude leading zeroes.

share|improve this answer

Let's introduce variables for the digits. It is always useful to be able to talk about the objects that you are dealing with, and the most direct way is to give them names. So, let's say the digits you are using are $a,b,c,d$.

The number that in base $10$ is written as $abcd$ is really $1000a+100b+10c+d$. Since $1000$ and $100$ are already multiples of $4$, this number will be a multiple of $4$ precisely when $10c+d$ is a multiple of $4$. In particular, of course, $d$ is even.

But you are told that no matter how you permute the digits, the result is again a multiple of $4$. So, in particular, $abdc$ is also a multiple of $4$. (Why did I look at this specific number? Well, I already know that $10c+d$ is a multiple of $4$, I may as well try to learn something more about $c$ and $d$ before bringing the other two variables into the mix.)

Ok, so $10d+c$ is a multiple of $4$. Subtracting, we see that $9(c-d)$ is a multiple of $4$, so $c-d$ is a multiple of $4$.

Now, since the same happens with all the other permutations, we see that also $c-a,c-b,a-b$ are multiples of $4$. If one of them is $2$ or $6$ (remember, they must be even), the others must also be among $2$ and $6$. But $62$ is not a multiple of $4$, so this cannot be.

So the only remaining options are that $a,b,c,d$ are among $0,4,8$. Now we see all the possible numbers formed this way work, and counting should be easy. (You may want to double check whether something like $0484$ is a valid number, since it is not a four digit integer. If not, $0$ cannot be used, unless $a=b=c=d=0$.)

share|improve this answer
    
+1 for the 1000a + 100b + 10c + d comment, which convinced me that "A number written in base ten is a multiple of 4 if and only if the two-digit number formed by its last two digits is a multiple of 4." –  masonk Jan 21 '13 at 16:14

I could be wrong; but a number is divisible by 4 if and only if the last 2 numbers are. There are of course 25 = 100/4 of these combinations of 2 numbers. Then the same applies to the first two which might be permuted with the last two and we have 25^2 = 625 of these numbers. If we do not accept the leading 0, it would be (88/4)*25 = 550 numbers or not far from it. More or less. Permutations between digits 1 and 2 and between 3 and 4 are not counted.

share|improve this answer
    
Well, this begs the question of why permutations between digits 1 and 2 and between 3 and 4 are not counted, or any other permutations? $(13)(24)$ generates an awfully small subgroup of $S_4$. –  Erick Wong Jan 21 '13 at 6:30

Your Answer

 
discard

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

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