Finding the sum of values The number $2001$  can be written in the form of $x^2-y^2$ when $x,y$ are positive integers  in four different ways ,then how to find the the sum of $x$ values 
 A: Hint: $x^2-y^2=(x-y)(x+y)$ with $0<x-y<x+y$ and $2001$ has which property?

Complete "theory" of this:
For $n\in \mathbb N$, let $$f(n)=\sum_{(x,y)\in\mathbb N^2,\atop x^2-y^2=n} x$$
be the result we are looking for.
Given $n\in\mathbb N$, any solution to $x^2-y^2=n$ with $x,y\in\mathbb N$ determines a divisor $d=x-y$ of $n$ because $n=x^2-y^2=(x-y)(x+y)$. We have $d>0$ because $x-y=\frac n{x+y}>0$ and $d<\sqrt n$ because $x+y>x-y$.
On the other hand, if $n$ is odd, then any positive divisor $d$ of $n$ with $d^2<n$ gives rise to a solution $x-y=d, x+y=\frac nd$, i.e. $x=\frac{d+\frac nd}2$, $y=\frac{\frac nd-d}2$ (note that $\frac nd$ is also odd, hence the numerators are even). 
If $n$ is even but not a multiple of $4$, then $d$ and $\frac nd$ in the expressions above always have  different parity, hence there is no solution. If $n$ is a multiple of $4$, then $d$ and $\frac nd$ must both be chosen even, that is $d$ is a divisor of $\frac n4$.
In summary this means
$$f(n)=\begin{cases}\tfrac12\sigma(n)&\text{if }n\text{ odd and not a perfect square},\\
\tfrac12(\sigma(n)-\sqrt n)&\text{if }n\text{ odd and perfect square},\\
0&\text{if }n\equiv 2\pmod 4,\\
\tfrac12\sigma(\tfrac n4)&\text{if }4|n\text{ and $n$ not a perfect square},\\
\tfrac12\sigma(\tfrac n4)-\frac14\sqrt n&\text{if }n\text{ is an even perfect square}.\end{cases} $$
Here, $\sigma(n)$ denotes the sum of all (positive) divisors of $n$.
It is well-known that
$$\sigma(n)=\prod_{p|n,\atop p\text{ prime}}\frac{p^{k_p+1}-1}{p-1}\qquad\text{if }n=\prod_{p|n,\atop p\text{ prime}}p^{k_p} . $$
Now find the prime factorization of $n=2001$.
A: Hint: Use $x^2 - y^2 = (x+y)(x-y)$ and the prime factorization of $2001$ to explicitly find the solutions $(x,y)$.
A: Hints:
$$2001=3\cdot667=(x-y)(x+y)\Longrightarrow\begin{cases}x-y=3\\x+y=667\end{cases}$$
...or the other way around and minus signs....
