Let f(n,k) be the number of ways of distributing k candies to n children so that each child receives at most 2 candies. For example, if n=3, then f(3,7)=0,f(3,6)=1 and f(3,4)=6.
Determine the value of
f(2006,1)+f(2006,4)+f(2006,7)+⋯+f(2006,1000)+f(2006,1003).
Comment. Unfortunately, there was an error in the statement of this problem. It was intended that the sum should continue to f(2006,4012).