Find all positive integers $p,q,r,s>1$ such that $$p!+q!+r!=2^s.$$
Problem
Source: India Practice TST 2017 D1 P2
Tags: number theory, Diophantine equation
09.12.2017 21:50
Just checking some $\nu_2$s, all the answer are $(p,q,r,s)=(2,3,4,5),(2,3,5,7)$ and other permutations of $p,q,r$ with the same $s$.
21.12.2018 17:55
Nice and easy. Here's my solution: WLOG assume that $p \geq q \geq r$. Then $r! \mid q!$ and $r! \mid p!$, which means that $r! \mid p!+q!+r! \Rightarrow r! \mid 2^s$. But, if $r \geq 3$, then $3 \mid r! \Rightarrow 3 \mid 2^s$, which is a contradiction. This gives $r<3$, i.e. $r=2$, and so our equation is reduced to $$p!+q!=2^s-2=2(2^{s-1}-1) \Rightarrow \nu_2(p!+q!)=1$$ CASE-1 $(p \geq q+2):$ In this case $$2 \mid \frac{p!}{q!} \Rightarrow 2 \nmid \left(\frac{p!}{q!}+1 \right) \Rightarrow 1=\nu_2(p!+q!)=\nu_2 \left(q! \left(\frac{p!}{q!}+1 \right) \right)=\nu_2(q!)+\nu_2 \left(\frac{p!}{q!}+1 \right) \Rightarrow \nu_2(q!)=1 \Rightarrow q=2 \text{ OR } 3$$Here, the last statement follows from the fact that $4 \mid q!$ whenever $q \geq 4$. This gives $$p!=2^s-4 \text{ OR } p!=2^s-8 \Rightarrow \nu_2(p!) \leq 3 \Rightarrow p \leq 5$$where the last bound follows keeping in mind that $16 \mid p!$ if $p \geq 6$. As $p \geq q+2$, we just need to check 3 values of $(p,q,r)$, namely $(5,2,2); (4,2,2); (5,3,2)$. One can easily check that only $(5,3,2)$ works. CASE-2 $(p=q+1):$ Here we have $$2^s-2=p!+q!=q!((q+1)+1) \Rightarrow q!(q+2)=2(2^{s-1}-1) \Rightarrow \nu_2(q!(q+2))=1$$But it is easy to see that $4 \mid q!(q+2)$ when $q \neq 3$. This gives $q=3$ and $p=4$. One can easily see that this satisfies the problem condition. CASE-3 $(p=q):$ In this case we get $$2p!=2^s-2 \Rightarrow p!=2^{s-1}-1 \Rightarrow p! \text{ is odd}$$But, $2 \mid p! \text{ } \forall p \geq 2$. Thus, this case has no solutions. Summarizing the three cases, our final answer is $(p,q,r,s)=(5,3,2,7);(4,3,2,5)$ and other permutations of $p,q,r$ while keeping $s$ fixed.
17.11.2019 20:30
I mean, TST? And P2? And that too after asking a similar question in RMO with 2 replaced by 3. WLOG, let $p\geq q\geq r$ Then, $r!|2^s$. But, if $r>2$, then $3|r!$, this $3|2^s$, which is never true. So, $r=2$ Hence, $p!+q!=2(2^{s-1}-1)$ If $q\geq 4$, then 4 divides LHS but not RHS. So, $q=2$ or $3$ Case 1- $q=2$ $p!=2^s-4$, so $4|p!$, but $8$ doesn't divide $p!$. Hence, $p\leq 3$. Now it's easy to check that no such $p$ works. Case 2- $q=3$ $p!=2^s-8$, so $8|p!$, but 16 doesn't divide $p!$. So, $p\leq 5$. Now by checking, we find $p=4,5$ works. Hence, all the solutions are $(2,3,4,5)$ and $(2,3,5,7)$
18.02.2021 19:20
anantmudgal09 wrote: Find all positive integers $p,q,r,s>1$ such that $$p!+q!+r!=2^s.$$ Let us assume without loss of generality that $p \geq q \geq r > 1$. We see that if $r \geq 3$, then $3 \mid p! + q! + r!$ which is a contradiction. Therefore $r = 2$. Since $r = 2$, we see that if $q \geq 4$, then $4 \mid p! + q!$ whereas $4 \nmid 2!$, so this means that $p! + q! + r! = 2 $ which has no solution since $p! + q! + r! \geq 1! + 1! + 2! = 4$ and so $q \leq 3$. Now, it is easy to see that $p \leq 5$ since $\nu _2(2^s) \geq \text{min}(\nu_2(p!), \nu_2(q! + r!))$ and the equality would hold if $\nu_2(p!) \neq \nu_2(q! + r!)$ and we can see that there will be a size contradiction too if $p > 5$. Now it is just casework I will leave to the reader. At the end, we get that the solutions to the given equation are $\boxed{(p, q, r, s) = (2, 3, 5, 7), (2, 3, 4, 5)}$
13.04.2021 17:51
This came in a practice TST?! WLOG let $p \ge q \ge r$. Then, we know that $r!$ divides the LHS and so it must be a power of two and since $r > 1$, it means that $r = 2$. So, we get $p! + q! = 2(2^{s-1}-1)$ and so since $v_2$ of the RHS is $1$, it means that $v_2(q!) = 1$, which means $q = 2,3$. If $q = 2$, then we get $p! = 4(2^{s-2}-1)$ and so $v_2(p!)$ is $2$, which is impossible. If $q = 3$, then we get $p! = 8(2^{s-3}-1)$ and so $v_2(p!) = 3$ and so $p$ must be one of $4,5$. Checking them, we get the solutions $(4,3,2,5), (5,3,2,7)$ and permutations among $p,q,r$
22.04.2021 06:04
WLOG $p\ge q\ge r$. If $r\ge3$ then $\pmod3$ gives $0\equiv(-1)^s\pmod3$, impossible. Thus we must have $r=2$. It becomes $p!+q!=2^s-2$. Now $v_2(p!+q!)=v_2\left(2\left(2^{s-1}-1\right)\right)=1$ since $s>1$. If $q\ge4$ then $v_2(p!+q!)\ge3$, so $q<4$. Case 1: $q=2$ The equation becomes $p!=2^s-4$. Here, it's easy to see that if $s=2$ then $p!=0$, absurd. Similarly, we do: $$v_2(p!)=v_2\left(4\left(2^{s-2}-1\right)\right)=2.$$This is impossible, since $f(x)=v_2(x!)$ is monotonically increasing and $f(2)=1$ while $f(3)=1$ and $f(4)=3$. Case 2: $q=3$ The equation now is $p!=2^s-8$. If $s\in\{2,3\}$ then $p!\le0$, so $s\ge4$. Now: $$v_2(p!)=v_2\left(8\left(2^{s-3}-1\right)\right)=3,$$so since $f(3)=1$, $f(4)=f(5)=3$, and $f(6)=4$, we must have $p=4$ or $p=5$. Easily, $p=4$ produces $32=2^s\Rightarrow s=5$ and $p=5$ implies $128=2^s\Rightarrow s=7$. The only solutions are: $$(p,q,r,s)=(4,3,2,5),(5,3,2,7)$$and permutations of $(p,q,r)$.
25.04.2021 00:51
anantmudgal09 wrote: Find all positive integers $p,q,r,s>1$ such that $$p!+q!+r!=2^s.$$ Really Easy. WLOG $p\geq q\geq r \geq$ Then as $r! |p! +q! +r! =2^s \implies r=2$ So we got that $1+\frac{p! }{2}+\frac{q!}{2}=2^{s-1}$ So $\frac{p! }{2}+\frac{q!}{2}$ is odd and also as $p\geq q$ so $v_2(q!)=1\implies q=3$ is the only possible case. Hence we got $4+\frac{p! }{2}=2^{s-1}$ Now if $v_2(\frac{p!}{2})>2$ or $v_2(\frac{p!}{2})=1$ then it is clearly not possible So $v_2(\frac{p!}{2})=2\implies v_2(p!)=3\implies p=4 \text{or} 5$ is the only possible case By using the fact that $2^{\sum_{i=1}^{k} [\frac{p}{2^i}]}|p!$ where $[x]$ is the greatest integer less then $x$ and $2^k$ is the largest power of $2$ which is less than $p$. Now we can just substitute and check the $2$ possible cases for $p$ Case 1-: When $p=4$ we get $2! +3! +4! =2+6+24=32=2^5$ Hence we get that when $p=4$, $s=5$. Case 2-: when $p=5$ we get $2! +3! +5! =2+6+120=128=2^7$ Hence we get that when $p=5$, $s=7$. Hence the only possible solution are $\boxed{\{p, q, r, s\}=\{2, 3,4,5\}, \{2, 3,5,7\}}$ and it's permutation where value $s$ must be fix. $\blacksquare$
25.04.2021 07:52
02.05.2021 15:14
Solution with some of my friends. As well $r=2$ and there is no solution when $4\leq q$ and $p=q=r$ We will see two cases. Case 1: $q=2$ The equation becomes $p!+4=2^s$ Or,$0+1\cong (-1)^s$ (mod $3$) If, $s$ is odd then it's a contradiction. Let $s=2m$,$m>1$ So, $p!+4=4^m$ If, $p>7$ then L.H.S.$ \cong 4$ (mod $8$) R.H.S.$\cong 0$(mod $8$) Checking the values from $3 \, to \, 7$ there is no solution. So, $q\neq 2$ Case 2: $q=3$ $p!+8=2^s$, $s>3$ Write $s=4+a$ [$a=0,1,2,....$] $p!+8=16*2^a$ L.H.S.$\cong 8$( mod $16$), $p>5$ R.H..S.$\cong 0$ (mod $16$) So the remain possibilities of $p$ are $P=3,4,5$ The rest is trivial.
20.06.2022 15:26
WLOG $p\ge q\ge r$. Note that $r!\mid 2^s$, so $r<3$, which implies $r=2$. So $p!+q! = 2^s-2$. Now, $q!\mid 2^s-2$. Since $s>1$, we have $4\nmid 2^s-2$, so $4\nmid q!$, which implies $q<4$. Case 1: $q=2$. Then we have $p!=2^s-4$. Since $p!>0$, we have $s>2$, so $8\nmid 2^s-4=p!$. Thus, $p<4$. Note that $1!+4=5, 2!+4=6, 3!+4=10$, all are not powers of $2$. Case 2: $q=3$. Then we have $p!=2^s-8$. Since $p!>0$, we have $s>3$, so $16\nmid 2^s-4=p!$, however, $8\mid p!$. This implies $p\in \{4,5\}$. We have $4!+8=32=2^5$ and $5!+8=128=2^7$. This gives the only two solutions $\boxed{(p,q,r,s)=(4,3,2,5), (5,3,2,7)}$, and permutations of $p,q,$ and $r$, which work.
24.06.2022 13:18
redacted
24.06.2022 13:29
Turtle09 wrote: @above aren't both solutions identical? No. Why do you think so?
24.06.2022 13:35
ZETA_in_olympiad wrote: Turtle09 wrote: @above aren't both solutions identical? No. Why do you think so? wait nevermind my computer did something weird and loaded it as megarnie posting the same solution twice
03.03.2023 07:57
BY Mod 3 it is clear that one or two of them is less than $3$ i.e=$2$ W.L.O.G $ p>q>r$ Case 1 one of them is less than $3$ $p!+q!=2^s-2=2(2^{s-1}-1)$ By mod 4 one of them is less than $4$ we assumed numbers to be greater than $3$ thus $q=3$ $p!=2^3(2{s-3}-1)$ By legendre theorm we know max value of $p$ is 5 Thus we have $p=3,4,5$ Checking yields $\boxed{5,3,2,7}$ and $\boxed{4,3,2,5}$ works. Case 2 when two of them are less than 3 i.e 2 $p!=4(2^{s-2}-1)$ yields no solution thus we are done Q.E.D
03.03.2023 09:33
megarnie wrote: WLOG $p\ge q\ge r$. Note that $r!\mid 2^s$, so $r<3$, which implies $r=2$. So $p!+q! = 2^s-2$. Now, $q!\mid 2^s-2$. Since $s>1$, we have $4\nmid 2^s-2$, so $4\nmid q!$, which implies $q<4$. Case 1: $q=2$. Then we have $p!=2^s-4$. Since $p!>0$, we have $s>2$, so $8\nmid 2^s-4=p!$. Thus, $p<4$. Note that $1!+4=5, 2!+4=6, 3!+4=10$, all are not powers of $2$. Case 2: $q=3$. Then we have $p!=2^s-8$. Since $p!>0$, we have $s>3$, so $16\nmid 2^s-4=p!$, however, $8\mid p!$. This implies $p\in \{4,5\}$. We have $4!+8=32=2^5$ and $5!+8=128=2^7$. This gives the only two solutions $\boxed{(p,q,r,s)=(4,3,2,5), (5,3,2,7)}$, and permutations of $p,q,$ and $r$, which work. Nice!
21.03.2023 17:11
We claim that the only solutions are $\boxed{(p,q,r,s)=(2,3,4,5),(2,3,5,7)}$, with permutations in $(p,q,r)$, giving a total of 12 solutions. WLOG let $p\geq q\geq r$. If $r\geq 3$, then $3\mid r!$, $3\mid q!$ and $3\mid p!$ all hold, $\Rightarrow 3\mid(p!+q!+r!)\Rightarrow 3\mid2^s$, which is false. So, $r<3$, which forces $r=2$ along with $r>1$. So, $p!+q!=2^s-2=2(2^{s-1}-1)$. We use a similar argument to show that $q<4$. Indeed, if $q\geq 4\Rightarrow 4\mid(p!+q!)\Rightarrow 4\mid2(2^{s-1}-1)\Rightarrow 2\mid(2^{s-1}-1)$, which is false since $s>1$. So, $q<4\Rightarrow q\in\{2,3\}$. Case 1) $q=2$. Substituting, we get $p!=2^s-4=4(2^{s-2}-1)\Rightarrow s>2$, and $2^2$ is the highest power of $2$ dividing $p!$. But this is not true for any $p$, as $4\nmid3!$ but $8\mid4!$. Case 2) $q=3$. Substituting, we get $p!=2^s-8=8(2^{s-3}-1)\Rightarrow s>3$, and $2^3$ is the highest power of $2$ dividing $p!$, forcing $p\in\{4,5\}$. Now, $p=4$ gives $2^s=32\Rightarrow s=5$, while $p=5$ gives $2^s=128\Rightarrow s=7$. Thus, the only solutions are $\boxed{(p,q,r,s)=(2,3,4,5),(2,3,5,7)}$ (with permutations in $(p,q,r)$), as claimed.
15.11.2024 18:27
Really an easy one
15.11.2024 19:30
Note that at least one of $p, q, r$ is 2, else 3 divides the rhs. So let $r=2$. By v2, $min(p, q) <4$. Take cases. If $q=2$, we have no solutions. If $q=3$, $p \in\{4, 5\}$, from where we can check manually.
15.11.2024 21:50
Assume \( p \geq q \geq r \). If we analyze the case \( r \geq 3 \), setting \( r = 2 \) becomes inevitable. This is because in \(\pmod{3}\), one of the terms must be congruent to 2. Thus, we are solving: \[ p! + q! = 2^s - 2. \] If we take \( q \geq 4 \), it implies \( q \leq 3 \), leading to the constraint: \[ 1 < r \leq q \leq p. \] Now, two cases arise: ### Case 1: \( q = 2 \) For \( q = 2 \), the equation simplifies to: \[ p! = 2^s - 4. \] Since \( p! > 1 \), we deduce \( s > 2 \). Also: \[ 8 \mid (2^s - 4 = p!), \]which is not valid unless \( p < 4 \). ### Case 2: \( q = 3 \) Here, the equation becomes: \[ p! = 2^s - 8. \] Again, \( p! > 0 \) and \( s > 3 \). However: \[ 16 \nmid (2^s - 8), \]which holds only for \( p = 4 \) or \( p = 5 \). Substituting these values: - For \( p = 4 \): \[ 4! + 8 = 32 = 2^5. \]- For \( p = 5 \): \[ 5! + 8 = 128 = 2^7. \] ### Final Results: The solutions are: \[ (4, 3, 2, 5) \quad \text{and} \quad (5, 3, 2, 7). \]