P549
projecteuler.net

Divisibility of Factorials

ℹ️Published on Sunday, 28th February 2016, 10:00 am; Solved by 3052;
Difficulty rating: 15%

The smallest number $m$ such that $10$ divides $m!$ is $m=5$.
The smallest number $m$ such that $25$ divides $m!$ is $m=10$.

Let $s(n)$ be the smallest number $m$ such that $n$ divides $m!$.
So $s(10)=5$ and $s(25)=10$.
Let $S(n)$ be $\sum s(i)$ for $2 \le i \le n$.
$S(100)=2012$.

Find $S(10^8)$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.