(3^10)! / 3^x = k
x and k are integers.
What is the maximum value for x ?
I think: (3^10 - 1) / 2 = 29524.
Sloane's sequence #A003462
If we evaluate how many of the the prime factors of 3^10 are 3's, we can start by noting that every third term of the factorial is divisible by three. So there are 3^9 terms that are a divisible by 3.
Similarly every ninth term is a factor of 9, so there are 3^8 terms that are divisible by 9.
Keep going. and the total number of 3's that make up the prime factors of 3^10 is 3^9 + 3^8 + 3^ 7 + ...+ 3^1 + 3^0. That seems to equal your answer of (3^10-1)/2, but I'm not sure why....
Edit - OK, got it. It's not hard to show that:
Hence for k=3 and n = 9:
Your result follows immediately from Legendre's Theorem (Legendre's Theorem - The Prime Factorization of Factorials). This gives the exact power of p, a prime, that divides n factorial.