Find all pairs $(n,k)$

134 Views Asked by At

The question is as it was officially written:

Find all pairs of positive integers $(n,k)$ such that $n! + 8 = 2^k$.

I started by writing a list of $n!$ and $2^k$ and found that two valid solutions were $(4,5)$ and $(5,7)$. To continue, I did

\begin{align} n! & = 2^k-8 \\ & = 2^k-2^3 \\ n\times (n-1) \times \cdots \times 2 \times1& = 2^3(2^k-1) \\ \end{align}

I noticed that every number in $n!$ divides $2^3$ and $2^k-1$. Then I set out to find some solutions. My assumption - which is a big one - is that every number in $n!$ could be made by the prime numbers already in $n!$. For example, $3$ and $7$ might divide $2^k-1$ so hence $21$ divides $2^k-1$.

If you want to answer the question, stop reading. Below is how I finished the question, and I know I got it wrong.


$\underline {\text{Proof}}$: We have $$n!=2^3(2^k-1)$$

And we want to prove that any prime $p$ divides $2^3(2^k-1) \implies p|2^k-1$ .

Hence assume \begin{align} 2^k-1 & \equiv 0 \pmod p \\ 2^k & \equiv 1 \pmod p \\ \end{align}

By Fermat's Little Theorem we know that $k=p-1$. Since there are infinitely many primes and there can be infinitely many primes in $n!$, the solution set $(n,k)$ is countably infinite.

I'm pretty sure this is wrong but I would like to know the correct approach to a multi-variable question like this.

3

There are 3 best solutions below

0
On BEST ANSWER

The question is the same as finding all $(n,k)$ so that $$ n!=2^k-8 $$ For $k\le3$, the right hand side is not positive, so there is no possible $n$.

For $k\ge4$, the right hand side has exactly three factors of $2$. For $n\ge6$, $n!$ has at least four factors of $2$. Therefore, we only need to check $n\le5$.

0
On

Consider this: What is the largest power of $2$ that divides $n! + 8$? You have to check $n = 1, 2, 3, 4, 5$ one by one, but after that you can make a theoretical argument that covers the rest of them.

0
On

Hint: Prove that $n!+8 \equiv 8 \bmod 16$ for all $n \ge 6$.