Work through 2026 AMC 8 Problem 24 on prime factorization with a written solution, hints, and a visual explanation.
Number TheoryLevel 5 · Final stretch
The notation n! ("n factorial") is defined as the product of the first n positive integers. (For example, 3! = 1 × 2 × 3 = 6.) Define the superfactorial of a positive integer n to be the product of the factorials of the first n integers. (For example, the superfactorial of 3 is 1! × 2! × 3! = 12.) How many factors of 7 appear in the prime factorization of the superfactorial of 51?
A. 147
B. 150
C. 156
D. 168
E. 171
Hints
Use the fact that the power of 7 in k! is ⌊k/7⌋ + ⌊k/49⌋, and think about how this count changes as k runs from 1 to 51.
The count of 7s in k! stays constant over each run of 7 consecutive k-values, then jumps up — figure out the width and height of each block.
Multiply each block's width by its height and add all the blocks — don't forget the extra jump once k reaches 49.
Read the step-by-step solution
Answer: E · 171
Count the 7s in one factorial
The superfactorial of 51 is 1! × 2! × ⋯ × 51!. By Legendre's formula, k! contains ⌊k/7⌋ + ⌊k/49⌋ factors of 7. The second term only kicks in once k reaches 49 = 7².
v₇(k!) = ⌊k/7⌋ + ⌊k/49⌋
Build the staircase for k = 1…51
As k grows, the 7-count climbs by 1 at each multiple of 7 (7, 14, 21, …), giving equal-height blocks of width 7. At k = 49 it jumps by 2 — from 6 up to 8 — because both ⌊k/7⌋ and ⌊k/49⌋ increase there.