当n=2k (k=0,1,2,…,1004)时,
1-2+…+(-1)^(n+1)·n=1-2+…+(-1)^(2k+1)·2k
=(1-2)+(3-4)+…+((2k-1)-2k)
=k个-1
=-k
=-n/2
当n=2k+1 (k=0,1,2,…,1003)时,
1-2+…+(-1)^(n+1)·n=1-2+…+(-1)^(2k+2)·(2k+1)
=(-0+1)+(-2+3)+…+(-2k+(2k+1))
=(k+1)个1
=k+1
=(n+1)/2
综上所述,1-2+…+(-1)^(n+1)·n=(n+1)/2 (n为奇数时)或 -n/2 (n为偶数时)
故最小的非负数是当n=1时,代数和为1.