Well to answer your last question...
The prime factorization of 13 is 13, 308 is 2^2*7*11, and 1001 is 7*11*13, and if you take the maximum of all of the primes, and multiply them together, you get 2^2*7*11*13, or 4004.
Also either 13 or 1001 was useless, just not both.