### Instruction: Some positive integers have exactly four positive factors. For example, 35 has only 1, 5, 7 and 35 as its factors. What is the sum of the smallest five positive integers that each have exactly four positive factors?### Response: I know that the number of factors of a positive integer depends on its prime factorization. For example, 35 = 5 * 7, which has two prime factors. Each prime factor can be either included or not included in a factor of 35, so there are 2 * 2 = 4 possible factors.
If a positive integer has exactly four positive factors, then it must have either two distinct prime factors, like 35, or one prime factor raised to the third power, like 8 = 2^3.
So I need to find the smallest positive integers that are either the product of two distinct primes, or the cube of a prime.
The smallest primes are 2, 3, 5, 7, 11, 13, and so on.
The smallest cube of a prime is 2^3 = 8, which has factors 1, 2, 4, and 8.
The next smallest cube of a prime is 3^3 = 27, which has factors 1, 3, 9, and 27.
The smallest product of two distinct primes is 2 * 3 = 6, which has factors 1, 2, 3, and 6.
The next smallest product of two distinct primes is 2 * 5 = 10, which has factors 1, 2, 5, and 10.
The next smallest product of two distinct primes is 2 * 7 = 14, which has factors 1, 2, 7, and 14.
The next smallest product of two distinct primes is 3 * 5 = 15, which has factors 1, 3, 5, and 15.
The next smallest product of two distinct primes is 3 * 7 = 21, which has factors 1, 3, 7, and 21.
The next smallest product of two distinct primes is 2 * 11 = 22, which has factors 1, 2, 11, and 22.
The next smallest product of two distinct primes is 2 * 13 = 26, which has factors 1, 2, 13, and 26.
The next smallest cube of a prime is 5^3 = 125, which has factors 1, 5, 25, and 125.
The next smallest product of two distinct primes is 3 * 11 = 33, which has factors 1, 3, 11, and 33.
The next smallest product of two distinct primes is 3 * 13 = 39, which has factors 1, 3, 13, and 39.
The next smallest product of two distinct primes is 5 * 7 = 35, which has factors 1, 5, 7, and 35.
The next smallest product of two distinct primes is 5 * 11 = 55, which has factors 1, 5, 11, and 55.
The next smallest product of two distinct primes is 5 * 13 = 65, which has factors 1, 5, 13, and 65.
The next smallest product of two distinct primes is 7 * 11 = 77, which has factors 1, 7, 11, and 77.
The next smallest product of two distinct primes is 7 * 13 = 91, which has factors 1, 7, 13, and 91.
The next smallest product of two distinct primes is 11 * 13 = 143, which has factors 1, 11, 13, and 143.
The next smallest cube of a prime is 7^3 = 343, which has factors 1, 7, 49, and 343.
I notice that the smallest five positive integers that each have exactly four positive factors are 6, 8, 10, 14, and 15.
I add them up to get the answer.