Let u be a fixed positive integer. Prove that the equation $n! = u^{\alpha} - u^{\beta}$ has a finite number of solutions $(n, \alpha, \beta).$
Problem
Source: China Team Selection Test 2004, Day 1, Problem 2
Tags: floor function, logarithms, number theory
14.10.2005 17:55
Please post your solutions. Use $\LaTeX$ please! Please omit jokes/smilies etc. Comments and generalizations are welcome. If you noticed that the comment has been discussed elsewhere, please provide a link. If you don't know the link(s) do NOT post and state that the problems has been discussed many times. If the provided solution is not complete, right or in $\LaTeX$-style I would be happy if you could (re-) post your/the solution in this thread again! At the end of your (re-)written solution post the links to those insufficient solutions as follows:
Happy Problem-Solving!
10.04.2006 17:49
This is not a formal proof (maybe someone would like to formalize it): problem is equivalent to proving that $n!=u^{\alpha}(u^{\beta}-1)$ has finite number of solutions. By a well-known lemma if $p^k || n!$, and $p \perp u$ and $p \perp u-1$ then $p^k||\beta$. That actually finishes the problem because $u^{\beta}-1$ is growing much faster than $n!$ by above observation (that shouldn't be hard to prove).
11.05.2006 23:33
What lemma¿ I see problems, e.g. $n=4$, $p=3$, $u=2$.
12.05.2006 17:15
Well, please forget about this nonsense above I have realized later after I had posted it that it was completely wrong.
14.05.2006 17:43
OK lets try to kill it (the idea is more or less that one of Megus)... Lemma: when $ p$ is a odd prime and $ p \nmid a$, then the order of $ 1 + ap^k \mod p^s$ is $ p^{s - k}$ for all $ s > k$. (But I will not post the proof as long as noone wants to see it: it's boring calculation and induction) Now to the problem: We want that $ v_p(n!) = v_p(u^b - 1)$ for all primes $ p$ not dividing $ u$. Look at any odd prime $ p$ dividing $ u - 1$ (if there is none, so when $ u = 2^k + 1$, just consider any odd prime dividing $ u^s - 1$ for some $ s$). Let $ p^k || u^s - 1$, so $ u^s = ap^k + 1$, $ p \nmid a$, and by the above $ u^s$ has order $ p^{t - k}$ seen $ \mod p^t$. When we also choose $ s$ to be minimal with $ p|u^s - 1$, we get that the order of $ u \mod p^n$ is $ s \cdot p^{t - k}$. Now lets compute what the order has to be for given $ n$: There are $ \left\lfloor \frac {n}{p}\right\rfloor > \frac {n}{p} - 1$ multiples of $ p$ in $ n!$, thus $ v_p(n!) > \frac {n}{p} - 1$. We need that $ u^b \equiv 1 \mod p^{v_p(n!)}$, thus $ b$ being a multiple of $ p^{v_p(n!) - k}$. So we have (finally!): $ n^n \geq n! = u^a(u^b - 1) > u^{p^{v_p(n!) - k}} - 1 > u^{p^{\frac {n}{p} - k - 1}} - 1$ giving: $ n^n \geq u^{p^{\frac {n}{p(p - 1)} - k - 1}}$ which by taking logarithms yields: $ n^2 \geq n \cdot \log(n) \geq \log(u) \cdot p^{\frac {n}{p(p - 1)} - k - 1}$ or equivalently: $ \log(u)^{ - 1} n^2 + \cdot (k + 1) \geq n \cdot \log(n) \geq \left( p^{\frac {1}{p}\right)^n}$ But this can only happen for finetely $ n$ since one the left is a polynomial, on the right is an exponential function. So the problem is dead, dead, dead, any questions Edit: simplified it a bit. Edit number two: changed the error mentioned below.
14.05.2006 20:58
I suppose it should be $p^{s-k}$ instead of $p^{s-k-1}$ in the lemma (check the case for $k=1$: $(1+ap)^{p^{s-2}}\equiv 1+ap^{s-1} \mod p^s$) though it doesn't influence the solution which is nice
14.05.2006 21:09
Thanks, I corrected it. But it's very similar to what you mentioned above
14.05.2006 22:24
can i ask something about these lemmas you people keep coming with? do you make them to suit the needs for this specific problem or have you read them some where and recall them as you notice they would be usefull for these problems?
15.05.2006 20:23
The one I used above is another way of expressing something some people call "Hensels Lemma" (see the Formulary). In general, some lemmas reappear from time to time. Others more rarely, and there are also some that you just make up for this special problem. Thus I would say that you can't classify them.
18.04.2009 17:52
Here is an alternative solution based on cyclotomic polynomial To ZetaX:do you have a nice proof for the lemma below?
Attachments:

24.03.2019 17:36
Here's a new solution with LTE. First, note that for any fixed $n$ there are only finitely many solutions because $\alpha$ is bounded by considering a prime divisor of $u$ and then $\beta$ is fixed when $\alpha$ and $n$ are known. It suffices to show that only finitely many $n$ have solutions, then. We will prove that $n$ is bounded from above. Rewrite the equation as \[ n! = u^{\beta} (u^{m}-1 ) \]where $m=\alpha-\beta.$ Now, consider an odd prime $p$ not dividing $u$ and denote the order of $u$ modulo $p$ by $d$. For sufficiently large $n$, $p$ must divide $n!$ so $d$ must also divide $m$. By the Lifting the Exponent Lemma, \[ \nu_p(u^m-1) = \nu_p(u^d-1) + \nu_p( \frac{m}{d} ) \leq \nu_p( u^d - 1 ) + \log_p \left(\frac{m}{d} \right) .\]Letting $c=\nu_p(u^d-1) - \log_p(d)$, it becomes clear that $\nu_p(u^n-1) \leq \log_p(m) + c$ for a fixed constant $c$. However by Legendre, \[\nu_p(u^m-1) = \nu_p(n!) = \sum_{k=1}^{\infty} \left\rfloor\frac{n}{p^k} \right\rfloor \geq \frac{n}{p} - 1. \]From these two inequalities, we deduce that \[ {m} \geq p^{\frac{n}{p} - c} \]for a new constant $c$. Then, a chain of inequalities reveals that \[ n^n \geq n! = u^{\beta} (u^m - 1 ) \geq u^{\log_p{m} + c} \geq u^{p^{\frac{n}{p} - c} } . \]Taking logs of each side gives that \[ n \ln{n} \geq p^{\frac{n}{p} - c} \ln{u} , \]which can only hold for finitely many $n$ since the left hand side is less than a polynomial of $n$ and the right hand is an exponential in $n$.
11.07.2019 22:20
Not my solution with Zsigmondy's. Rewrite the equation as $n!=u^a(u^b-1)$. Then $$a=v_u(n!)=\sum_{k=1}^{\infty} \Biggl\lfloor\frac{n}{u^k}\Biggr\rfloor < \sum_{k=1}^{\infty}\frac{n}{u^k}\le n$$so $a\le n-1$. Moreover, by Zsigmondy's theorem there exists a prime number $p$ such that $p|u^b-1$ and $p\nmid u^m-1$ for any $m<b$. Hence $ord_p(u)=b$, so because from Fermat's Little Theorem we have $p|u^{p-1}-1$, it follows that $b|p-1$, so $b\le p-1$. But since $p|n!$, we have $p\le n$, thus $b \le p-1 \le n-1$. Therefore $$ n!=u^a(u^b-1)\le u^{n-1}(u^{n-1}-1) $$which clearly has a finite number of solutions.
04.09.2021 19:55
Let $(n,b,c)$ be a solution. Replace $(u,\alpha,\beta)$ with $(a,b,c)$ for convinence. By LTE,$\nu_p(a^b-a^c)=\nu_p(a^{b-c}-1) \le \nu_p(a^{(b-c)(p-1)}-1)=\nu_p(a^{p-1}-1)+\nu_p(b-c)\ge \nu_p(a^b-a^c)=\nu_p(n!)>\frac{n}{p}-1$ Now let $\nu_p(b-c)\ge \frac{n}{p}-k$ for some constant $k$ independent of $n$ and hence $n^n>n!=a^b-a^c \ge a^{p^{\frac{n}{p}-k}}$ and by taking logarithms we will be done.
05.09.2021 12:34
ryan17 wrote: Not my solution with Zsigmondy's. Rewrite the equation as $n!=u^a(u^b-1)$. Then $$a=v_u(n!)=\sum_{k=1}^{\infty} \Biggl\lfloor\frac{n}{u^k}\Biggr\rfloor < \sum_{k=1}^{\infty}\frac{n}{u^k}\le n$$ Isn't it true for prime u?
07.10.2022 04:24
SerdarBozdag wrote: ryan17 wrote: $$a=v_u(n!)=\sum_{k=1}^{\infty} \Biggl\lfloor\frac{n}{u^k}\Biggr\rfloor < \sum_{k=1}^{\infty}\frac{n}{u^k}\le n$$ Isn't it true for prime u? You're right; Legendre's formula works only when $u$ is a prime. So @ryan17 takes a wrong step here.
26.11.2022 03:55
Suppose that $n, b, c$ are positive integers such that $n! = a^{b} - a^{c}$ for a given $a$. Thus by Exponent Lifting, we have that for all primes $p$, \[v_p(a^b - a^c) = v_p(a^c) + v_p(a^{b-c} - 1) = cv_p(a) + v_p(a^{b-c}-1) = v_p(n!) \] Note that $a$ and $a^{b-c} - 1$ are relatively prime so let $p_1, p_2, ... ,p_u$ be the primes which divide $a$. Now consider $p \in \text{\textbraceleft} p_1, p_2, ... , p_u \text{\textbraceright}.$ Then we know that $cv_p(a) = v_p(n!)$, so it must be true that \[c \hspace{1mm}|\hspace{1mm} \text{gcd}( v_{p_1}(n!), v_{p_2}(n!), ... , v_{p_u}(n!)). \]so $c$ can take on only finitely many values for each $n$. Now let $r$ be the least prime which is greater than every prime which divides $a$ or $a^{b-c}-1$, so $n < r$ and thus $n$ is bounded. For each choice of $n$ and $c$, there is at most one value of $b$ which satisfies $n! = a^{b} - a^{c}$, so we are done.
22.03.2023 23:13
@above how do we know that there are finitely many primes which divide $a^{b-c} - 1$? Note that $a$ is fixed, but $b-c$ is not.
30.08.2023 15:49
20.08.2024 08:19
Clearly $a > b$ must hold and both must be nonnegative integers. Factor as $n! = u^b(u_{a-b} - 1)$. Notice that $n! = O(n!)$ and $u^a - u^b = O(u^a)$ and $O(n!) > O(u^a)$ so there are finitely many $n$ that will work. Now it suffices that for some fixed $n$, there are finitely many solutions to $n! = u^b(u_{a-b} - 1)$. Let $p$ be some prime dividing $u$. Then it is clear that $\nu_{p}(n!) \leq \sum_{i=1}^{\infty} \frac{n}{p^i} < n$ so $b$ is bounded by a constant determined by $n$. It now suffices to show that $a-b$ is also bounded, as a bound on all values $u$, $a$ and $b$ makes the total number of triples $(u, a, b)$ finite. Notice that by Zsigmondy there must be a sufficiently large $a$ so that $(u^{a-b} - 1, n!) = 1$ as the number of prime factors of $n!$ is finite, so we have an upper bound on $a$ as well so we are done.
12.01.2025 22:44
We first rewrite the equation as \[n!=u^\beta(u^{\alpha-\beta}-1).\]Let $p>2$ be a prime that does not divide $u$. Notice that by LTE we have \[v_p(u^{\alpha-\beta}-1)\le v_p((u^{p-1})^{\alpha-\beta}-1)=v_p(\alpha-\beta)+v_p(u^{p-1}-1).\]Thus (by Legendre's formula) \[v_p(\alpha-\beta)+v_p(u^{p-1}-1) \ge v_p(n!)>\frac np-1 \implies v_p(\alpha-\beta)\ge\frac np-v_p(u^{p-1}-1)-1.\]Let $C=p^{-1-v_p(u^{p-1}-1)}$. We get \[\alpha-\beta \ge Cp^\frac np.\]But \[n!=u^{\alpha}-u^{\beta}\ge u^{\alpha-\beta}\ge u^{Cp^{\frac np}}.\]Thus, using an extremely weak inequality, \[n^n\ge u^{Cp^{\frac np}} \implies n\log n \ge Cp^{\frac np}\log u\]which obviously does not hold for sufficiently large values of $n$. Note that $C$ does not depend on $n$, thus $n$ is bounded with respect to $u$. As $\alpha$ and $\beta$ are also obviously bounded with respect to $n$ (they are at most $n!$) we arrive at the conclusion that the equation has only finitely many solutions.