Skip to main content

AMC 12 Mock Exam 9 Problem 9

Problem 9 of 25

What is the smallest positive integer nn for which n!n!, when written in base 1212, ends in at least 3030 zeros?

Answer choices

Show solution

Solution

Since 12=22⋅312=2^2\cdot3, the number of trailing zeros of n!n! in base 1212 is the largest kk with 22k3k∣n!2^{2k}3^k\mid n!, namely min⁡(⌊v22⌋, v3)\min\left(\left\lfloor\frac{v_2}{2}\right\rfloor,\,v_3\right). Here v2v_2 and v3v_3 are the exponents of 22 and 33 in n!n!. We need v3≥30v_3\ge30 and v2≥60v_2\ge60.

By Legendre's formula, v3(62!)=20+6+2=28v_3(62!)=20+6+2=28 and v3(63!)=21+7+2=30v_3(63!)=21+7+2=30, so the factor 33 requires n≥63n\ge63. But v2(63!)=31+15+7+3+1=57<60v_2(63!)=31+15+7+3+1=57<60, so 63!63! ends in only 2828 zeros. Next, v2(64!)=32+16+8+4+2+1=63≥60v_2(64!)=32+16+8+4+2+1=63\ge60 and v3(64!)=30v_3(64!)=30, so 64!64! ends in exactly 3030 zeros. The answer is 64\boxed{64}.

(Treating 33 as the limiting prime, as 55 is in base 1010, gives the trap 6363.)

Tagged: trailing zeros of a factorial in base 12