Determine the maximum integer \( n \) for which \( 3^n \) is a divisor of \( 50! \).The exponent of a prime \( p \) in the prime factorization of \( n! \) is calculated using Legendre's formula:\[\sum_{k=1}^{\infty} \left\lfloor \frac{n}{p^k} \right\rfloor\]where \( \left\lfloor x \right\rfloor \) represents the floor function.For this problem, \( p = 3 \) and \( n = 50 \). The objective is to compute:\[\sum_{k=1}^{\infty} \left\lfloor \frac{50}{3^k} \right\rfloor\]Calculation:Term 1 (\( k = 1 \)):\[\left\lfloor \frac{50}{3} \right\rfloor = \left\lfloor 16.67 \right\rfloor = 16\]Term 2 (\( k = 2 \)):\[\left\lfloor \frac{50}{9} \right\rfloor = \left\lfloor 5.56 \right\rfloor = 5\]Term 3 (\( k = 3 \)):\[\left\lfloor \frac{50}{27} \right\rfloor = \left\lfloor 1.85 \right\rfloor = 1\]Term 4 (\( k = 4 \)):\[\left\lfloor \frac{50}{81} \right\rfloor = \left\lfloor 0.62 \right\rfloor = 0\]Subsequent terms will also be zero as \( 3^k \) exceeds 50.Summation:\[16 + 5 + 1 = 22\]Consequently, the largest integer \( n \) such that \( 3^n \) divides \( 50! \) is \( 22 \).