Note that in the set there are multiples of . But of these, are multiple of and so on.

You must count once the numbers which are multiples of p but not of p², twice the numbers which are multiple of p² and not of p³,... , in order to get the maximum power of p dividing n!

And to do so it's enough to sum