To find the package a binary comes from, in rpm based system, you might type:
$ rpm -qf /usr/bin/factor
which will print the package name. Instead, with:
$ rpm -qif /usr/bin/factor
you will get also information on a package, including it's home page in many cases.
Source rpms also exist, but how to get them depends on the high-level package manager used on top of RPM (yum, urpmi, apt-get4 for rpm, ...).
On most systems, also, /usr/share/doc/ contains some documentation on the program, and the website link is pretty often found somewhere there, maybe in the README.