Solution 1
Note that the upper bound for our sum is 2019, and not 2020, because if it were 2020 then the function composition cannot equal to 17. From there, it's not too hard to see that, by observing the function composition from right to left, N is (note that the summation starts from the right to the left):
x=17∑2019y=x∑2019z=y∑20191.
One can see an easy combinatorical argument exists which is the official solution, but I will present another solution here for the sake of variety.
Applying algebraic manipulation and the hockey-stick identity 3 times gives
x=17∑2019y=x∑2019z=y∑20191
=x=17∑2019y=x∑2019z=y∑2019(0z−y)
=x=17∑2019y=x∑2019(12020−y)
=x=17∑2019(22021−x)
=(32005)
Hence,
N=3⋅2⋅12005⋅2004⋅2003≡010(mod1000)
Solution 2
To solve f(f(f(x)))=17, we need to solve f(x)=y where f(f(y))=17, and to solve that we need to solve f(y)=z where f(z)=17.
It is clear to see for some integer a≥17 there is exactly one value of z in the interval [a,a+1) where f(z)=17. To understand this, imagine the graph of f(z) on the interval [a,a+1) The graph starts at 0, is continuous and increasing, and approaches a+1. So as long as a+1>17, there will be a solution for z in the interval.
Using this logic, we can find the number of solutions to f(x)=y. For every interval [a,a+1) where a≥⌊y⌋ there will be one solution for x in that interval. However, the question states 0≤x≤2020, but because x=2020 doesn't work we can change it to 0≤x<2020. Therefore, ⌊y⌋≤a≤2019, and there are 2020−⌊y⌋ solutions to f(x)=y.
We can solve f(y)=z similarly. 0≤y<2020 to satisfy the bounds of x, so there are 2020−⌊z⌋ solutions to f(y)=z, and 0≤z<2020 to satisfy the bounds of y.
Going back to f(z)=17, there is a single solution for z in the interval [a,a+1), where 17≤a≤2019. (We now have an upper bound for a because we know z<2020.) There are 2003 solutions for z, and the floors of these solutions create the sequence 17,18,19,...,2018,2019
Lets first look at the solution of z where ⌊z⌋=17. Then f(y)=z would have 2003 solutions, and the floors of these solutions would also create the sequence 17,18,19,...,2018,2019.
If we used the solution of y where ⌊y⌋=17, there would be 2003 solutions for f(x)=y. If we used the solution of y where ⌊y⌋=18, there would be 2002 solutions for x, and so on. So for the solution of z where ⌊z⌋=17, there will be 2003+2002+2001+...+2+1=(22004) solutions for x
If we now look at the solution of z where ⌊z⌋=18, there would be (22003) solutions for x. If we looked at the solution of z where ⌊z⌋=19, there would be (22002) solutions for x, and so on.
The total number of solutions to x is (22004)+(22003)+(22002)+...+(23)+(22). Using the hockey stick theorem, we see this equals (32005), and when we take the remainder of that number when divided by 1000, we get the answer, 10
~aragornmf
Solution 3 (Official MAA)
For any nonnegative integer n, the function f increases on the interval [n,n+1), with f(n)=0 and f(x)foreveryxinthisinterval.Onthisintervalf(x)=x(x-n),whichtakesoneveryrealvalueintheinterval[0,n+1)exactlyonce.Thusforeachnonnegativerealnumbery,theequationf(x) = yhasexactlyonesolutionx \in [n, n+1)foreveryn \ge \lfloor y \rfloor$.
For each integer a≥17 there is exactly one x with ⌊x⌋=a such that f(x)=17; likewise for each integer b≥a≥17 there is exactly one x with ⌊f(x)⌋=a and ⌊x⌋=b such that f(f(x))=17. Finally, for each integer c≥b≥a≥17 there is exactly one x with ⌊f(f(x))⌋=a, ⌊f(x)⌋=b, and ⌊x⌋=c such that f(f(f(x)))=17.
Thus f(f(f(x)))=17 has exactly one solution x with 0≤x≤2020 for each triple of integers (a,b,c) with 17≤a≤b≤c<2020, noting that x=2020 is not a solution. This nondecreasing ordered triple can be identified with a multiset of three elements of the set of 2003 integers {17,18,19,…,2019}, which can be selected in (32005) ways. Thus
N=62005⋅2004⋅2003≡10(mod1000).
Video Solution 1
https://youtu.be/bz5N-jI2e0U?t=515
Video Solution 2
https://youtu.be/YWKlWuwDwmI