How many collections of four numbers, from 1 to 25, have a sum multiple of 5?

373 Views Asked by At

How many collections of four numbers, from 1 to 25, added together are a multiple of 5?

I.E the collection $${18, 23, 24, 25}$$ has a sum of 90, which is the maximum sum multiple of 5 that can be constructed with unique numbers from 1 to 25.

I wrote a list of combinations that I'd find with some brute-forcing if you could call it that way, in a attempt to decipher a formula out of them but i don't seem to be getting anywhere.. Obviously the solution should be expressed in a more general form but I clearly don't know what I'm doing or where to begin.

If there is any soul that can give me some hint on this, would greatly appreciate it :)

1

There are 1 best solutions below

0
On BEST ANSWER

If $\{a,b,c,d\}$ has a sum congruent to $x\ (\mathrm{mod}\ 5)$, then $$\{a+1\ (\mathrm{mod}\ 25), b+1\ (\mathrm{mod}\ 25), c+1\ (\mathrm{mod}\ 25), d+1\ (\mathrm{mod}\ 25)\}$$ has a sum congruent to $x+4\ (\mathrm{mod}\ 5)$. Given any $x$, this clearly provides a bijection between the collection of 4-sets whose sums are congruent to $x$ and the collection of 4-sets whose sums are congruent to $x+4$. Since this holds for any $x$, and since $\mathrm{gcd}(4,5) = 1$, it follows that all 5 collections of 4-sets have the same size. In particular, the collection of 4-sets whose sum is a multiple of 5 is exactly one fifth of the collection of all 4-sets. That whole collection has size ${25}\choose{4}$, and one fifth of that is: $$2530$$