Let a=f(0,0,0,…,0), b=f(1,0,0,…,0) and c=f(2,0,0,…,0), say a=(a1,a2,…,a2000), b=(b1,b2,…,b2000) and c=(c1,c2,…,c2000). It's easy to conclude that there exists a unique 1≤i0≤2000 such that a,b and c differ at position i0, i.e., ai0=bi0=ci0=ai0. This also gives i0≤1000. Another easy argument shows that if x0=f(0,d2,d3,…,d2000)=(x1,x2,…,x2000), then xi0=ai0 and also if x1=f(1,e2,e3,…,e2000)=(y1,y2,…,y2000), then yi0=bi0.
A similar argument shows the following: let
at=f(0,0,…,0,…,0)=(a1,a2,…,a2000),
bt=f(0,0,…,1,…,0)=(b1,b2,…,b2000),
ct=f(0,0,…,2,…,0)=(c1,c2,…,c2000),
where t≤1000 is the position of 1 and 2, and x=f(x1,x2,…,x2000)=(y1,y2,…,y2000). Therefore yit=ait if xt=0 (it is the position that changes from at to bt), yit=bit if xt=1 and yit=cit if xt=2.
Now, it's clear that (i1,i2,…,i1000) is a permutation of (1,2,…,1000). On the other hand, if at=f(0,0,…,0,…,0)=(a1,a2,…,a2000) and bt=f(0,0,…,1,…,0)=(b1,b2,…,b2000), where t≥1000 is the position of 1, there is a unique j≥1000 such that aj=bj. Denoting this j by ij, if x=f(x1,x2,…,x2000)=(y1,y2,…,y2000), one can show in a similar way that yit=ait if xt=0 and yit=bit if xt=1. Finally, in order to count the number of different functions f:X→X, it suffices to choose (i1,i2,…,i1000), which is a permutation of (1,2,…,1000), (i1001,i1002,…,i2000), which is a permutation of (1001,1002,…,2000), and (ait,bit,cit) for 1≤t≤1000 and (ait,bit) for 1001≤t≤2000.
This gives that the total number of functions is 1000!2×121000.