Gregmat Quant Day 2 Flashcard?

I don’t understand the solution on Greg’s flashcard for Group 2.

It is asking for the number of 3s in 30! I understand you want to find the multiples of 3^1 and 3^2 and finally 3^3. However, I used the multiple formula which is last multiple - first multiple / the multiple +1. So I get [(30-3)/3] +1 and then [(30-9)/3] +1 and then [(30-27)/3]+1. These give 10, 8 and 2 as number of multiples.

Why doesn’t the formula work? Greg’s answer is 10, 3 and 1?

Our goal is to find the number of 3’s present in the prime factorization of 30!

To systematically count, we note the following:

Numbers like 1,2,4,5, and the like contribute zero factors of 3

Numbers like 3,6,12,15 and the like contribute one factor of 3

Numbers like 9 and 18 contribute two factors of 3

27 contributes three factors of 3

As such, our first pass would involve counting numbers contributing at least one factor of 3. We know that there are 10 such terms because every multiple of 3 in [1,30] works.

For our second pass, we count numbers contributing at least a second factor of 3. We know that if a number has two factors of 3 then it must be a multiple of 9. Owing to that, we count the multiples of 9 in [1,30], which happens to be 3 in quantity.

For our final pass, we count numbers contributing at least a third factor of 3. Needless to say, if a number has at least 3 factors of 3 then it must be a multiple of 27. There happens to be exactly one multiple of 27 in [1,30].

Putting all the counts together leads us to 10 + 3 + 1.

It’s mostly a logical flaw from your side in applying the formula. Building from the logic I outlined above should allow you to incorporate your “multiples formula”.

Ah I just realized that I wasn’t applying the formula correctly. The last multiple of 9 is 27 and the first multiple is 9. So with that correction, (27-9) / 9 +1 gives 3.

Thank you!