# [SOLVED]find n and k in n!+8=2^k

##### Well-known member
Find all pairs of integers n and k such that $n!+8 = 2^k$

Last edited:
• Theia and Klaas van Aarsen

#### Klaas van Aarsen

##### MHB Seeker
Staff member
Find integers n and k such that $n!+8 = 2^k$
From inspection I can find $n=4,\,k=5$.
As a bonus I can see that $n=5,\,k=7$ works as well.
I kind of suspect that you intended to find all such integers, did you? Ah well, that was not the question.

• #### Opalg

##### MHB Oldtimer
Staff member
From inspection I can find $n=4,\,k=5$.
As a bonus I can see that $n=5,\,k=7$ works as well.
I kind of suspect that you intended to find all such integers, did you? Ah well, that was not the question.
I really don't like that ISPOILER effect! #### Klaas van Aarsen

##### MHB Seeker
Staff member
I really don't like that ISPOILER effect! It's new in Xenforo. I felt I just had to try it out. ##### Well-known member
From inspection I can find $n=4,\,k=5$.
As a bonus I can see that $n=5,\,k=7$ works as well.
I kind of suspect that you intended to find all such integers, did you? Ah well, that was not the question.
I have edited the question to make it more clear

If $k>3$ then $2^k-8 = 8(2^{k-3} - 1)$, which is an odd multiple of $8$ and therefore not divisible by $16$. But if $n>5$ then $n!$ is divisible by $2*4*6$, which is a multiple of $16$. Those two facts ensure that there are no more solutions of $n! + 8 = 2^k$ apart from the two already mentioned.