Max value of $a-b$ given $\frac {a!}{b!}$ multiple of $ 4$ but not of $8$.

184 Views Asked by At

If $\frac{a!}{b!}$ is a multiple of $4$ but not a multiple of $8$,then what is the maximum value of $a-b$ ?

My work : I've tried brute force method by trying different values for $a$ and $b$ to seek for some patters and it "seems" that the maximum value of $a-b$ is $3$. But of course if that's true or not I need to prove or disprove it,which I cant see how to do that.

P.s If you can give only hints that would be best.

Thanks in advance.

2

There are 2 best solutions below

2
On BEST ANSWER

$\frac{a!}{b!} = (b+1)*(b+2)*...*(a-1)*a$

If you have two consecutive numbers multiplied, then one will be even, the other odd, and the product of the two will be even. If you have 3 consecutive numbers multiplied, then you will have either ODD x EVEN x ODD or EVEN x ODD x EVEN and if you have 4 consecutive numbers multiplied, then you will definitely have two evens and two odds.

If you have two consecutive even numbers, then one will be a multiple of 4 and the second even number will make the product into a multiple of eight.

2
On

In this case, it may be better to think of the numbers modulo $4$, rather than just $2$. In that case, the sequence of numbers you have to choose from (in order to select an interval to multiply) is

odd, even, odd, divisible by $4$, odd, even, odd, divisible by $4$, odd, $\ldots$

or, if we count the factors of $2$, we have

$0, 1, 0, 2+, 0, 1, 0, 2+, 0, \ldots$

where $2+$ denotes two or more factors of $2$. Can you show how large an interval you can have before you are forced to embrace three or more factors of $2$?