I don't understand where he's getting the (2+1) * (1+1) from.
-
This post is deleted! -
[Originally posted in the Discussions]
I don't understand where he's getting the (2+1) * (1+1) from.
-
Thanks for the question! Here, we are trying to find the number of factors of 20, which we found the prime factorization of as \(2^2 \times 5^1.\) To count the number of factors, we want to count the number of ways that we can choose powers of 2's and 5's, which we multiply together to get our factor.
As in the video, we can pick either 0, 1, or 2 powers of 2, and either 0 or 1 powers of 5, for our factor. This means we have 3, or (2+1), choices for how many 2's we pick, and 2, or (1+1), choices for how many 5's we pick. To get the total number of choices, we simply multiply the two, giving (2+1)*(1+1), as you mentioned.
In fact, no matter what exponent our prime factor has, the number of choices for how many of that prime we can pick will always be the exponent plus 1. This is because we can pick any amount from 1 up to the exponent, or, as Po mentioned in the video, we could also choose to have zero of the prime factor, giving us one extra option each time.
Hopefully this clears things up, and don't hesitate to ask if you have any further questions!
Happy learning,
The Daily Challenge Team