If $S=\{1945, 1946, …, 2016, 2017\}$ and $A = \{a,b,c,d,e\} \subset S$ such that $5 | (a+b+c+d+e)$, calculate the number of possible $A$s.
Attempt
First, we can gather some data, to be specific: finding the minimum and maximum sum such that it is a multiple of 5. Notice that:
$$ 5 | (1945 + 1946 + 1947 + 1948 + 1949)$$
and also
$$ 5 | (2013 + 2014 + 2015 + 2016 + 2017)$$
So we have found two such sets: $\{1945,1946,1947,1948,1949\}$ with total sum of $9735$ and $\{2013,2014,2015,2016,2017\}$ with total sum of $10075$.
First it seems that it may be reasonable that the answer can be obtained by using the fact that the number of non-negative integer solutions to $u + v + w + x+ y = n$ is $\binom{n+4}{4}$.
Here is my idea: we can first try to calculate the number of integer solutions of
$$ a + b + c + d + e = 9740$$
but with constraints $1945 \le a, b, c, d, e$. We can transform the above as $$ (a-1945) + (b-1945) + (c-1945) + (d-1945) + (e-1945) = 15 $$
But this will overcount, for example, set $A' = \{1,2,3,4,5\}$, because it appears $5!$ times, and also $2 + 2 + 3 + 3 + 5$ will be counted which makes no sense because the variables must all have distinct values. So it will be difficult if we choose this path.
Let us just see a solution of $ a + b + c + d + e = 9740$ as organization of $9740 \: *$s and $4 \: +$s (with a rule $1945 \le a < b < c < d$ to simplify our organization):
$$ \underbrace{**…*}_{1946} + \underbrace{**…*}_{1947} + \underbrace{**…*}_{1948} + \underbrace{**…*}_{1949} + \underbrace{**…*}_{1950} $$
But after doing tedious attempts, I think the solution may be found manually and look for pattern, notice that we have to find the number of 5 combinations from $S$ such that the sum is $9735, 9740, 9745, …, 10075$.
We know the only possibility for $9735$ is $A' = \{1945,1946,1947,1948,1949\}$. Then for $9740$ we just need to "increase" by $5$ to our previous set: $\{1950,1946,1947,1948,1949\}$ will do, but is this the only one? no. There are more:
$$\{1945,1946,1947,1948,1954\}$$ $$\{1945,1946,1947,1953,1949\}$$ $$\{1945,1946,1952,1948,1949\}$$ $$\{1945,1951,1947,1948,1949\}$$
those are by adding 5 to one of the elements in $\{1945,1946,1947,1948,1949\}$. But by adding 2 and 3 to two elements we get:
$$\{1945,1946,1947,1950,1952\}$$ $$\{1945,1946,1949,1948,1952\}$$ $$\{1945,1948,1952,1951,1949\}$$ $$ \vdots $$