Given positive integers $N$ and $k$, we counted how many ways the number $N$ can be written in the form $a+b+c$, where $1 \leq a, b, c \leq k$, and the order of the addends matters. Could we have gotten 2007 as a result?
Solution. We claim that any number $N$ can be written as the sum of three positive integers in $\binom{N-1}{2}$ ways, considering the order of the addends.

To prove this, imagine placing $N$ balls in a row next to each other. The number of ways to write $N$ as the sum of three numbers is exactly the number of ways to divide the $N$ balls into three groups, considering the order of the groups. To divide the $N$ balls into three groups, we need to choose two out of the $N-1$ imaginary dividing lines between the balls. This can be done in $\binom{N-1}{2}$ ways.

2007 cannot be written in this form, but a number close to it, 2016, can: $2016=\binom{65-1}{2}$.

We have not yet considered the condition of the problem that 2007 must be divided using numbers between 1 and $k$.

If $k=N-1$, the number of ways to write it is still $\binom{N-1}{2}$, since we haven't used $N$ so far.

This is also true for $k=N-2$.

If $k=N-3$, we cannot count the case $(N-2), 1,1$ and its two other permutations.

If $k=N-4$, in addition to the previous cases, we cannot use the case $(N-3), 2,1$, which has a total of 6 permutations.

Therefore, for $k=N-4$, the total number of cases is: $\binom{N-1}{2}-3-6=\binom{N-1}{2}-9$. Since 2007 is exactly 9 less than 2016, then $N=65$ and $k=65-4=61$ results in the number of valid representations: $\binom{65-1}{2}-9=2007$.

Remark. Generally, for $2 k>N$ and $N-1>k$, the number of possible representations is:

$$
\binom{N-1}{2}-3 \cdot\binom{N-1-k}{2}
$$

The number of good cases is obtained by subtracting the number of bad cases from the total number of cases, i.e., the number of decompositions where one of the terms is greater than $k$. (Due to $2 k>N$, only one term can be such.)

We need to count the bad cases. Consider the previous balls, and first count the cases where the first group contains more than $k$ balls. This means that from the $(k+1)$-th ball to the $N$-th ball, we need to choose 2 out of the $N-1-k$ imaginary dividing lines, which can be done in $\binom{N-1-k}{2}$ ways. Since the group with more than $k$ balls can be any of the three, we need to multiply $\binom{N-1-k}{2}$ by 3.

Another solution: $N=121$ and $k=61$; $N=71$ and $k=53$; as well as $N=91$ and $k=53$.