Difference between revisions of "2024 SSMO Relay Round 5 Problems/Problem 1"

(Created page with "==Problem== Let the super factorial <math>!(n)</math> be defined on positive integers as <math>\prod_{i=1}^n i!.</math> Find the largest positive integer <math>k</math> such...")
 
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
==Solution==
 
==Solution==
 +
Let <math>f(n)</math> be the number of trailing zeroes <math>!(n)</math> has and <math>g(n)</math> denote the number of trailing zeroes <math>n!</math> has. Clearly, <math>f(n) = f(n-1)+g(n).</math> Consider the following table:
 +
 +
\begin{array}{c|c|c|c|c|c|c|c|c|c|c|c|c|c|c}
 +
n&1&2&3&4&5&6&7&8&9&10&11&12&13&14\\\hline
 +
g(n)&0&0&0&0&1&1&1&1&1&2&2&2&2&2\\
 +
f(n)&0&0&0&0&1&2&3&4&5&7&9&11&13&15\\
 +
\end{array}
 +
 +
It is easy to see that for <math>k=12,</math> exactly <math>12</math> integers such that <math>!(n)</math> has fewer than <math>12</math> trailing zeroes. Thus, the answer is <math>\boxed{12}</math>.
 +
 +
~SMO_Team

Latest revision as of 14:59, 10 September 2025

Problem

Let the super factorial $!(n)$ be defined on positive integers as $\prod_{i=1}^n i!.$ Find the largest positive integer $k$ such that that there are exactly $k$ positive integers $n$ such that $!(n)$ has fewer than $k$ trailing zeroes.

Solution

Let $f(n)$ be the number of trailing zeroes $!(n)$ has and $g(n)$ denote the number of trailing zeroes $n!$ has. Clearly, $f(n) = f(n-1)+g(n).$ Consider the following table:

\begin{array}{c|c|c|c|c|c|c|c|c|c|c|c|c|c|c} n&1&2&3&4&5&6&7&8&9&10&11&12&13&14\\\hline g(n)&0&0&0&0&1&1&1&1&1&2&2&2&2&2\\ f(n)&0&0&0&0&1&2&3&4&5&7&9&11&13&15\\ \end{array}

It is easy to see that for $k=12,$ exactly $12$ integers such that $!(n)$ has fewer than $12$ trailing zeroes. Thus, the answer is $\boxed{12}$.

~SMO_Team