# Let $k$ and $n$ be positive integers, find all pairs $(n,k)$ of positive integers such that $(n+1)^k-1=n!$

Let $$k$$ and $$n$$ be positive integers, find all pairs $$(n,k)$$ of positive integers such that $$(n+1)^k-1=n!$$

I tried $$n$$ from $$1$$ to $$4$$, and I guess $$n$$ should be a prime number.

• Well, as a quick remark: if $n$ is odd then the left hand is odd but the right hand is even. – lulu Oct 16 '17 at 14:50
• @lulu Except for $n=k=1$. – ajotatxe Oct 16 '17 at 14:51
• @ajotatxe Sure. I was mostly addressing the suggestion that $n$ ought to be prime. – lulu Oct 16 '17 at 14:52
• The equation is equivalent to: $$\sum_{j=0}^{k-1}(n+1)^j=(n-1)!$$ So if $n$ is prime we get $k\equiv -1\pmod n$. If $n$ is composite we get $n\mid k$. Then $k\ge n-1$. This might help. – ajotatxe Oct 16 '17 at 14:57
• Also worth noting: if $p<n+1$ is a prime dividing $n+1$ then $p$ divides the right hand but not the left. Thus $n+1$ has to be prime. – lulu Oct 16 '17 at 15:03

If $n+1$ is composite, then any prime dividing $n+1$ divides $n!$, but not $(n+1)^k-1$. Then $n+1$ is prime. Therefore, $n\le 2$ or $n$ is composite.

For $n=1$ we get easily the solution $n=k=1$.

For $n=2$ the equation becomes $$3^k-1=2$$ which clearly has only one solution, namely $k=1$.

So assume from now that $n$ is composite.

If $n=4$ the equation becomes $$5^k-1=24$$ that has the solution $k=2$.

If $n\ge 6$ then $(n-1)!$ is a multiple of $n$. Proof below.

The equation is equivalent to: $$\sum_{j=0}^{k-1}(n+1)^j=(n-1)!$$ So, since $n$ is composite, taking mod $n$ we get $n\mid k$. Then $k\ge n$. Thus,

$$(n+1)^k-1\ge(n+1)^n-1>n^n>n!$$

So there are no more solutions.

Proof that $n\ge 6$ and composite implies $n\mid (n-1)!$: If $n$ is the square of a prime $p$ then $p$ and $2p$ are among the factors of $(n-1)!$. Otherwise take the least prime divisor $p$ and $n/p$.

• Sorry, I still don't understand why the equation is equivalent to the summation. – claxxy Oct 17 '17 at 14:44