Let $n$ be positive integer. Find the minimum of the $n$ such $$2017^{{2017}^{2017}}~~|~n!$$

[Note that 2017 is a prime]

use this formula:

$$v_{2017}(n!)=\dfrac{n-S_{2017}(n)}{2016}$$so find least $n$ such $$ n-S_{2017}(n)\ge 2017^{2017}$$ $S_{p}(n)$ denotes the sum of the standard base-p digits of n, then How find this least $n?$

  • $\begingroup$ What is $S_{2017}(n)$? $\endgroup$
    – Anurag A
    Feb 1, 2017 at 7:47
  • $\begingroup$ cut-the-knot.org/blue/LegendresTheorem.shtml for more details ... but it's a good strategy so far, given 2017 is prime. $\endgroup$
    – rtybase
    Feb 1, 2017 at 8:07
  • $\begingroup$ First thing to do is to ascertain the prime factorization of $2017$. $\endgroup$ Feb 1, 2017 at 8:07
  • $\begingroup$ @GerryMyerson,2017 is prime $\endgroup$
    – math110
    Feb 1, 2017 at 8:08
  • 1
    $\begingroup$ Good, you've taken the first step. I suggest editing that piece of information into the body of your question. $\endgroup$ Feb 1, 2017 at 8:10

2 Answers 2


Let $n=2016 \times 2017^{2017}+2017 $.
$n-S_{2017}(n)=2016 \times 2017^{2017}+2017-2017=2016 \times 2017^{2017}$,

$$v_{2017}(n!)=\dfrac{n-S_{2017}(n)}{2016}=\dfrac{2016 \times 2017^{2017}}{2016}=2017^{2017}$$

It won't be hard to prove this $n$ is optimal.

  • $\begingroup$ How prove $n=2016\times 2017^{2017}+2017$? is minumum of the value $\endgroup$
    – math110
    Feb 1, 2017 at 13:58

idea If $n=2017^{k}$, then $$\nu_{2017}(n!)=\sum_{j=1}^{k}\left\lfloor\frac{n}{2017^j}\right\rfloor=1+\dotsb +2017^{k-1}=\frac{2017^k-1}{2016}$$ Now perhaps we want $k$ such that $$\frac{2017^k-1}{2016} \geq 2017^{2017}.$$

Note: this is just an idea which may require a bit more massaging to get the least value of $n$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .