How many factors does 360 have, and what is the sum of those factors?
Write 360 = 2^3 x 3^2 x 5. Number of factors = (3+1)(2+1)(1+1) = 24. Sum of factors = (1+2+4+8)(1+3+9)(1+5) = 15 x 13 x 6 = 1170.
Explain it simply
Every factor of 360 is built by choosing how many 2s, how many 3s and how many 5s to take from its prime factorisation. It is like ordering a thali: for the 2s you can pick 0, 1, 2 or 3 (four choices), for the 3s 0, 1 or 2 (three choices), for the 5 either 0 or 1 (two choices). Multiply the choices and you have counted every factor once.
Example
Question: Find the number of factors of 360 and their sum.
- Prime factorisation: 360 = 8 x 45 = 2^3 x 3^2 x 5^1.
- Number of factors = (3 + 1)(2 + 1)(1 + 1) = 4 x 3 x 2 = 24.
- Sum of factors: for each prime, add all its powers, then multiply.
- 2s: 1 + 2 + 4 + 8 = 15
- 3s: 1 + 3 + 9 = 13
- 5s: 1 + 5 = 6
- Sum = 15 x 13 x 6 = 1170.
let count = 0, sum = 0;
for (let i = 1; i <= 360; i++) if (360 % i === 0) { count++; sum += i; }
console.log(count); // Output: 24
console.log(sum); // Output: 1170What to say in the interview
"I factorise into primes, add one to each exponent and multiply for the count. For the sum, each prime contributes 1 plus all its powers up to its exponent, and I multiply those brackets. For 360 that is 24 factors summing to 1170."
Common mistakes
- Forgetting to add 1 to each exponent; the +1 is the choice of taking zero copies of that prime.
- Including 1 and the number itself is correct; do not drop them unless the question asks for proper factors.