I've thought about this all day but can't seem to find a solution.
If we want to find the greatest natural number $n$ such that $n^5$ is a divisor of $2017!$, how can that be done?
I've thought about this all day but can't seem to find a solution.
If we want to find the greatest natural number $n$ such that $n^5$ is a divisor of $2017!$, how can that be done?
A prime $p$ will contribute a factor of $p^n$ to $2017!$ where $n=\lfloor \frac {2017}p \rfloor + \lfloor \frac {2017}{p^2} \rfloor+ \lfloor \frac {2017}{p^3} \rfloor + \ldots$ per this question and Legendre's formula. You need to accumulate the largest power allowed for each prime less than $\frac {2017}5$
This is going to be a big number, since every small prime that divides $2017!$ does so more than five times.
For example, $23^{90}$ divides $2017!$ because there are $87$ multiples of $23$ less than $2017$, three of which $(529, 1058, 1587)$ are multiples of $529=23^2$. So for that greatest $n$, we can have $23^{18} \mid n$.
We can make a similar calculation for all the primes up to $\lfloor 2017/5 \rfloor = 403$ (so the greatest prime to consider is $401$), looking at $79$ different primes in all, including (as in the above example) checking for higher powers of those primes.
Can you make some progress from here?
It takes a while to calculate this. We'd basically need to go over all primes separately. 2017! consists of 2017 'factors'.
For $p = 2$, we see that there are $\lfloor 2017/2 \rfloor$ factors divisible by 2; $\lfloor 2017/4 \rfloor$ divisible by 4; $\lfloor 2017/8 \rfloor$ divisible by 8, etc. This means we have in total $\lfloor 2017/2 \rfloor + \lfloor 2017/4 \rfloor + \lfloor 2017/8 \rfloor + ... + \lfloor 2017/1024 \rfloor = 2010$ times that 2 appears in the factorization of 2017!. So $n$ has $\lfloor 2010/5 \rfloor$ = 402 factors of 2.
For $p = 3$, the sum is $\lfloor 2017/3 \rfloor + \lfloor 2017/9 \rfloor + \lfloor 2017/27 \rfloor + ... + \lfloor 2017/729 \rfloor = 1004$. So $n$ has $\lfloor 1004/5 \rfloor$ = 200 factors of 3.
For $p = 5$, the sum is $\lfloor 2017/5 \rfloor + \lfloor 2017/25 \rfloor + \lfloor 2017/125 \rfloor + \lfloor 2017/625 \rfloor = 502$. So $n$ has $\lfloor 502/5 \rfloor$ = 100 factors of 5.
For $p = 7$, the sum is $\lfloor 2017/7 \rfloor + \lfloor 2017/49 \rfloor + \lfloor 2017/343 \rfloor = 334$. So $n$ has $\lfloor 334/5 \rfloor$ = 66 factors of 7.
For $p = 11$, the sum is $\lfloor 2017/11 \rfloor + \lfloor 2017/121 \rfloor + \lfloor 2017/1331 \rfloor = 200$. So $n$ has $\lfloor 200/5 \rfloor$ = 40 factors of 11.
For $p = 13$, the sum is $\lfloor 2017/13 \rfloor + \lfloor 2017/169 \rfloor = 166$. So $n$ has $\lfloor 166/5 \rfloor$ = 33 factors of 13.
For $p = 17$, the sum is $\lfloor 2017/17 \rfloor + \lfloor 2017/289 \rfloor = 124$. So $n$ has $\lfloor 124/5 \rfloor$ = 24 factors of 17.
For $p = 19$, the sum is $\lfloor 2017/19 \rfloor + \lfloor 2017/361 \rfloor = 111$. So $n$ has $\lfloor 111/5 \rfloor$ = 22 factors of 19.
For $p = 23$, the sum is $\lfloor 2017/23 \rfloor + \lfloor 2017/529 \rfloor = 90$. So $n$ has $\lfloor 90/5 \rfloor$ = 18 factors of 23.
For $p = 29$, the sum is $\lfloor 2017/29 \rfloor + \lfloor 2017/841 \rfloor = 71$. So $n$ has $\lfloor 71/5 \rfloor$ = 14 factors of 29.
For $p = 31$, the sum is $\lfloor 2017/31 \rfloor + \lfloor 2017/961 \rfloor = 67$. So $n$ has $\lfloor 67/5 \rfloor$ = 13 factors of 31.
For $p = 37$, the sum is $\lfloor 2017/37 \rfloor + \lfloor 2017/1369 \rfloor = 55$. So $n$ has $\lfloor 55/5 \rfloor$ = 11 factors of 37.
For $p = 41$, the sum is $\lfloor 2017/41 \rfloor + \lfloor 2017/1681 \rfloor = 50$. So $n$ has $\lfloor 50/5 \rfloor$ = 10 factors of 41.
For $p = 43$, the sum is $\lfloor 2017/43 \rfloor + \lfloor 2017/1849 \rfloor = 47$. So $n$ has $\lfloor 47/5 \rfloor$ = 9 factors of 43.
For $p = 47$, the sum is $\lfloor 2017/47 \rfloor = 42$. So $n$ has $\lfloor 42/5 \rfloor$ = 8 factors of 47.
For $p = 53$, we have 38 factors in 2017!, so $n$ has $\lfloor 38/5 \rfloor$ = 7 factors of 53.
For $p = 59$, we have 34 factors in 2017!, so $n$ has $\lfloor 34/5 \rfloor$ = 6 factors of 59.
For $p = 61$, we have 33 factors in 2017!, so $n$ has $\lfloor 33/5 \rfloor$ = 6 factors of 61.
For $p = 67$, we have 30 factors in 2017!, so $n$ has $\lfloor 30/5 \rfloor$ = 6 factors of 67.
For $p = 71$, we have 28 factors in 2017!, so $n$ has $\lfloor 28/5 \rfloor$ = 5 factors of 71.
For $p = 73$, we have 27 factors in 2017!, so $n$ has $\lfloor 27/5 \rfloor$ = 5 factors of 73.
For $p = 79$, we have 25 factors in 2017!, so $n$ has $\lfloor 25/5 \rfloor$ = 5 factors of 79.
For $p = 83, 89, 97$, >= 20 factors in 2017!, so $n$ has 4 factors of 83, 89 and 97.
For $p = 101, 103, 107, 109, 113, 127, 131$, >= 15 factors in 2017!, so $n$ has 3 factors of 101, 103, 107, 109, 113, 127 and 131.
For $p = 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199$, >= 10 factors in 2017!, so $n$ has 2 factors of 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199.
For all primes between 201 and 403, >= 5 factors in 2017!, so $n$ has 1 factor of each of them.
That means the number you're looking for is
$$2^{402} 3^{200} 5^{100} 7^{66} 11^{40} 13^{33} 17^{24} 19^{22} 23^{18} 29^{14} 31^{13} 37^{11} 41^{10} 43^9 47^8 53^7 59^6 61^6 67^6 71^5 73^5 79^5 83^4 89^4 97^4 \\ 101^3 103^3 107^3 109^3 113^3 127^3 131^3 137^2 139^2 149^2 151^2 157^2 163^2 167^2 173^2 179^2 181^2 191^2 193^2 197^2 199^2 \\ 211 \cdot 223 \cdot 227 \cdot 229 \cdot 233 \cdot 239 \cdot 241 \cdot 251 \cdot 257 \cdot 263 \cdot 269 \cdot 271 \cdot 277 \cdot 281 \cdot 283 \cdot 293 \cdot \\ 307 \cdot 311 \cdot 313 \cdot 317 \cdot 331 \cdot 337 \cdot 347 \cdot 349 \cdot 353 \cdot 359 \cdot 367 \cdot 373 \cdot 379 \cdot 383 \cdot 389 \cdot 397 \cdot 401.$$
Okay. to begin with. For $n = \lfloor 2017/5 \rfloor = 403$ then $403, 806, 1209, 1612,2015$ all divide $2017!$ so $403^5| 2017!$. So the largest natural number must be at least $403$.
Okay, let's reason this out. For any prime $p > 403$ then five iterations of $p$ do not occur in $1..2017$. So we only have to find prime factors up to $403$ (i.e. up to $401$).
It's been asked here many times how to find the highest power of $p$ that divides $m$ factorial, and a little thought shows it is $\sum_k \lfloor m/p^k\rfloor$. (because single powers of $p$ occur $\lfloor m/p \rfloor$ times and $p^k$ occur $\lfloor m/p^k \rfloor$ times).
So $2^{1008 + 504 + 252 + 126 + 63 + 31 + 15 + 7 + 3 + 1}=2^{2010}|2017!$ so $(2^{402})^5|2017!$
And $3^{ 672 + 208 + 69 + 23 + 7 + 2} = 3^{381}|2017!$ so $(3^{196})^5 | 2017!$.
And as $2$ and $3$ are relatively prime $(2^{402}3^{196})^5|2017!$.
Keep going. It gets easier.
$5^{403+ 80 + 16 + 3} = 5^{502}|2017!$ so $5^{100}$ is the desired power.
$7^{288 + 41 + 5} = 7^{334} \implies 7^{ 66}$
$11^{183 + 16 + 1} = 11^{200} \implies 11^{40}$
$13^{155 +11} = 13^{166}\implies 13^{32}$
$17^{118+ 6} \implies 17^{24}$
$19^ {106 + 5} \implies 19^{22}$
$23^{87 + 3} \implies 23^{18}$
$29^{69 + 2} \implies 29^{14}$
$31^{65 + 2} \implies 31^{13}$
$37^{54 + 1} \implies 37^{11}$
$41^{49+1} \implies 41^{10}$
$43^{46+1} \implies 43^9$
$47^{42} \implies 47^8$
oog, I'm getting tired of typing. Continue until you get $401^1$. Multiply them all together and that is your number.
This is the number:
$$\begin{align} &100010938011744669138517577789925857151743217460702368346480125616377876408\\ &538990278670180435728524556485629972085821990929628830930213172188813345836\\ &041472115484786288118991050109986218553726995648015543378210574083699636802\\ &834377964454821544736336676265171251997297483049325561203880683968028205315\\ &137779365827747837670711607710459697611424069825087611585189871113171521037\\ &880186858038470270287723632596057489744231791658100098637866897522240753538\\ &619656349041652921538869642516322702648926867342493651281557304776109425725\\ &114776458515452986591496104935331490303366642830199334155981142775645996007\\ &762313637538453282471919069694903515211662820293047715547024393049605917962\\ &233345718402151484333761496519564473755836290804447421318143769661920445582\\ &769177627226532094801772372753614110720000000000000000000000000000000000000\\ &000000000000000000000000000000000000000000000000000000000000000 \end{align}$$
Conclusion/knowledge gained: none.