Write the given expression as a finite sum:
S(x)=∑k=01000xk(1+x)1000−k
Our goal is to find the coefficients of x499 and x500 in S(x) and then add them.
Step 1: Coefficient of xn in a single term.
For a fixed k, expand (1+x)1000−k using the Binomial Theorem:
xk(1+x)1000−k=xk∑r=01000−k(r1000−k)xr=∑r=01000−k(r1000−k)xk+r
Hence the coefficient of xn coming from the term with index k equals
(n−k1000−k)provided 0≤n−k≤1000−k
Step 2: Total coefficient of xn in S(x).
Sum the contributions from all k that can reach power n (namely k=0 to k=n):
cn=∑k=0n(n−k1000−k)
Step 3: Re-index the sum.
Put j=n−k(⇒k=n−j).
Then j runs from 0 to n and
cn=∑j=0n(j(1000−n)+j)
Step 4: Use the standard identity.
For any non-negative integers m,n,
∑j=0n(jm+j)=(nm+n+1)−(1)
Here m=1000−n, so from (1) we get
cn=(n1000−n+n+1)=(n1001)
Step 5: Evaluate the required coefficients.
Coefficient of x499: c499=(4991001)
Coefficient of x500: c500=(5001001)
Step 6: Add the two coefficients.
Using Pascal’s rule (rn)+(r+1n)=(r+1n+1) with n=1001,r=499:
c499+c500=(4991001)+(5001001)=(5001002)
Final Answer: (5001002) (Option D).