Find all nonnegative integer solutions to $2^a + 3^b + 5^c = n!$. Proposed by Mark Sellke
Problem
Source: USA TSTST 2017, Problem 4, proposed by Mark Sellke
Tags: factorial, number theory, TSTST 2017, Tstst, Diophantine equation
29.06.2017 06:01
For $n \le 4$, one can check the only solutions are: \begin{align*} 2^2 + 3^0 + 5^0 &= 3! \\ 2^1 + 3^1 + 5^0 &= 3! \\ 2^4 + 3^1 + 5^1 &= 4!. \end{align*}Now we prove there are no solutions for $n \ge 5$. A tricky way to do this is to take modulo $120$, since \begin{align*} 2^a \pmod{120} &\in \{ 1, 2, 4, 8, 16, 32, 64 \} \\ 3^b \pmod{120} &\in \{ 1, 3, 9, 27, 81 \} \\ 5^c \pmod{120} &\in \{ 1, 5, 25 \} \end{align*}and by inspection one notes that no three elements have vanishing sum modulo $120$. I expect most solutions to instead use casework. Here is one possible approach with cases (with $n \ge 5$). First, we analyze the cases where $a < 3$: $a=0$: No solutions for parity reasons. $a=1$: since $3^b + 5^c \equiv 6 \pmod 8$, we find $b$ even and $c$ odd (hence $c \neq 0$). Now looking modulo $5$ gives that $3^b + 5^c \equiv 3 \pmod 5$, $a=2$: From $3^b + 5^c \equiv 4 \pmod 8$, we find $b$ is odd and $c$ is even. Now looking modulo $5$ gives a contradiction, even if $c = 0$, since $3^b \in \{2,3 \pmod 5\}$ but $3^b + 5^c \equiv 1 \pmod 5$. Henceforth assume $a \ge 3$. Next, by taking modulo $8$ we have $3^b+5^c \equiv 0 \pmod 8$, which forces both $b$ and $c$ to be odd (in particular, $b,c > 0$). We now have \begin{align*} 2^a + 5^c &\equiv 0 \pmod 3 \\ 2^a + 3^b &\equiv 0 \pmod 5. \end{align*}The first equation implies $a$ is even, but the second equation requires $a$ to be odd, contradiction. Hence no solutions with $n \ge 5$.
30.06.2017 03:00
27.11.2017 05:05
v_Enhance wrote: A tricky way to do this is to take modulo $120$, since \begin{align*} 2^a \pmod{120} &\in \{ 1, 2, 4, 8, 16, 32, 64 \} \\ 3^b \pmod{120} &\in \{ 1, 3, 9, 27, 81 \} \\ 5^c \pmod{120} &\in \{ 1, 5, 25 \} \end{align*}and by inspection one notes that no three elements have vanishing sum modulo $120$. Just wondering, what is the motivation for picking 120?
27.11.2017 05:11
I'm not the one you're asking, but...
10.05.2018 05:33
CantonMathGuy wrote: Find all nonnegative integer solutions to $2^a + 3^b + 5^c = n!$. Proposed by Mark Sellke Help me! Solve integers equation: $2^x+5^y-7^z=0$
27.04.2019 13:47
Nice diophantine, but I thought it was on the easier side for a TST... I found a rather roundabout way to do it(at least compared to the $mod$ $120$ solution here)-
02.02.2020 16:27
15.03.2020 08:48
CantonMathGuy wrote: Find all nonnegative integer solutions to $2^a + 3^b + 5^c = n!$. Proposed by Mark Sellke
08.06.2020 07:39
I claim the only solutions are $\boxed{(a,b,c,n) = (1,1,0,3), (4,1,1,4), (2,0,0,3)}$. One can easily check that all of these work. We now prove there are no other solutions. First, we show that, if $n \geq 5, a \geq 3, b \geq 1$, there are no solutions. First, take the equation mod $4$ to get $3^b+5^c \equiv 0 \pmod{4}$, or $(-1)^b \equiv -1 \pmod{4}$, implying $b$ is odd. Taking the equation mod $8$ gives $3^b+(-3)^c \equiv 3 + (-3)^c \equiv 0 \pmod{8}$, implying $c$ is odd as well. Taking the equation mod $3$ gives $2^a+2^c \equiv 0 \pmod{3}$, implying $a$ is even since $c$ is odd. Finally, taking the equation mod $15$ gives $2^a \equiv \{1,4\} \pmod{15}, 3^b \equiv \{3,12\} \pmod{15}, 5^c \equiv 5 \pmod{5}$ (from the parities above). One can easily check that no combination of these residues sums to $0$ mod $15$. If $n < 5$, a finite case check gives the solutions listed above. From now, we assume $n \geq 5$. First, assume $b < 1$, or $b=0$. Then, $2^a+5^c+1 = n!$. If $c = 0$, then $2^a+2=n!$, which is impossible since $2^a+2$ is never divisible by $8$. Thus, $c \geq 1$. Taking the equation mod $5$ gives $2^a +1 \equiv 0 \pmod{5}$, so $a \equiv 2 \pmod{4}$. However, mod $4$ gives $2 \equiv 0 \pmod{4}$, contradiction. If $n \geq 5$ and $a < 3$, then we do casework on the value of $a$. If $a = 0$, we get $3^b+5^c+1$ is even, which is impossible. If $a=1$, we get $3^b+5^c+2 =n!$. Taking mod $4$ gives $(-1)^b+3 \equiv 0 \pmod{4}$, so $b$ is even. Taking mod $8$ gives $5^c + 3 \equiv 0 \pmod{8}$, so $c$ is odd. However, taking mod $5$ gives $3^b+2 \equiv 0 \pmod{5}$, so $b$ must be odd, contradiction. If $a=2$, then $3^b+5^c+4 = n!$. As before, mod $4$ gives $b$ odd, so mod $8$ gives $5^c+7 \equiv 0 \pmod{8}$, which is impossible. Thus, we have exhausted all cases and the above solutions are the only ones.
19.07.2020 19:51
This was an amusing exercise in bashing. Consider some solution $(a,b,c,n)$. Remark that $2^a+3^b+5^c \ge 1+1+1 = 3$, so $n\ge 3$. Additionally, remark $2\mid n!-3^b-5^c$, so $a\ge 1$. Let $a=k+1$. Claim: We have $n\le 4$. Solution: Suppose otherwise. Consider the case $a=1$. Rearranging yields $3^b+5^c=n!-2$. Take modulo $4$ to get $3^b+1\equiv 2\pmod{4}$, hence $b$ is even. In the case $c\ge 1$, we could take modulo $5$ to get $3^b\equiv 3\pmod{5}$, which can't occur if $b$ is even. Hence, we have $c=0$ and $3^b=n!-3$. This has no solution if $n=5$, so we may assume $n\ge 6$. Then, $3^b\equiv n!-3\equiv 6\pmod{9}$, which is absurd. Now, we may assume $a\ge 2$. Take modulo $4$ to get $3^b+1\equiv 0\pmod{4}$, so $b$ is odd. Take modulo $5$ to get $2^a+3^b\equiv 0\pmod{5}$. Since $b$ is odd, $3^b\equiv 2,3\pmod{5}$, implying that $2^a\equiv 2,3\pmod{5}$ and $a$ is odd as well. In particular, this implies $a\ge 3$. Take modulo $8$ to get $3+5^c\equiv 0\pmod{8}$, which implies $c$ is odd. Take modulo $3$ to get $2+5\equiv 0\pmod{3}$, which is false. Hence, there are no solutions for $n\ge 5$, and we are done. $\fbox{}$ Now, we have the bound $3\le n\le 4$. Case 1: We have $n=3$. Then, we have $6=2^a+3^b+5^c \ge 1+1+5^c=2+5^c$. This implies $c=0$, so $5=2^a+3^b \ge 2^a+1$. This implies $1\le a\le 2$. Taking $a=1$ gives $(a,b,c,n) = (1,1,0,3)$ and taking $a=2$ gives $(2,0,0,3)$. These constitute all possibilities in this scenario. Case 2: We have $n=4$. Then, we have $24=2^a+3^b+5^c \ge 1+1+5^c=2+5^c$. This implies $c\le 1$, so $c\in \{0,1\}$. Subcase 1: We have $c=0$. Rearrange to get $23=2^a+3^b \ge 1+3^b$. This implies $b\le 2$. Taking $b=2$ gives no solution, taking $b=1$ gives no solution, and taking $b=0$ gives no solution, hence there are no solutions in this case. Subcase 2: We have $c=1$. Rearrange to get $19=2^a+3^b\ge 1+3^b$. This implies $b\le 2$. Taking $b=2$ gives no solution, taking $b=1$ gives $a=4$, and taking $b=0$ gives no solution, hence we have the solution $(a,b,c,n) = (4,1,1,4)$. We have considered all cases, so the solutions are $(a,b,c,n) = (1,1,0,3), (2,0,0,3),(4,1,1,4)$.
13.09.2020 06:57
This is just low brain. The solutions are $(2,0,0,3),(1,1,0,3),(4,1,1,4).$ We show $n\geq 5$ has no solutions. By mod $4,$ $3^b+5^c\equiv 3^b+1\equiv 0\pmod{4},$ so $b\equiv 1\pmod{2}.$ Thus by mod $8,$ $c\equiv 1\pmod{2}$ as well. By mod $5,$ $2^a+3^b\equiv 0\pmod{5},$ implying $a\equiv b\pmod{4},$ or $a\equiv b\equiv 1\pmod{2}.$ But by mod $3,$ $2^a+5^c\equiv 2^a+2^c\equiv 0\pmod{3},$ implying that $c\equiv 0\pmod{2},$ which is a contradiction.
14.09.2020 05:30
Wow, yet another “oly NT problem” trivialized just by taking mods of small numbers
29.12.2020 19:51
For $n \leq 4$, we can manually check everything, finding that the only solutions are $(a,b,c,n)=(2,0,0,3),(1,1,0,3),(4,1,1,4)$. We now eliminate any $n \geq 5$. First take $\pmod{3}$. We see that $(-1)^a+(-1)^c \equiv 0 \pmod{3}$, so $a$ and $c$ are opposite parity. Taking $\pmod{4}$ gives the following: If $a=0$ then the LHS is odd, but for $n \geq 5$, $n!$ is even: contradiction If $a=1$, then the LHS becomes $3+(-1)^b$ and the RHS is $0$, so we get $b$ even. However, we also get that $c$ is even from the opposite parity condition. But then, taking $\pmod{8}$ gets that the LHS is $4$, while the RHS is $0$ because $n \geq 5$: contradiction. So we have $a \geq 2$. then the LHS becomes $1+(-1)^b$ and the RHS is $0$, so $b$ is odd. Now consider $\pmod{8}$. If $a=2$, then $c$ is odd, so $5^c \equiv 5 \pmod{8}$. Since we know $b$ is odd, we see that $3^b \equiv 3 \pmod{8}$, so the LHS is equal to $4$ but the RHS must be $0$: contradiction. So $a \geq 3$. Then we get $5^c + 3^b \equiv 5^c+3 \pmod{8}$. Since the RHS is $0$, we have $5^c \equiv 5 \pmod{8}$, which implies that $c$ is odd and $a$ is even. Therefore, $a$ is even, $b$ is odd, and $c$ is odd. Let $a=2x,b=2y+1,c=2z+1$. Then the condition rewrites as: $$4^x+3\cdot 9^y+5\cdot 25^z = n!$$Now, taking $\pmod{5}$, we see that $(-1)^x+3\cdot (-1)^y \equiv 0 \pmod{5}$. However, we can easily verify that this has no solutions. Thus any $n \geq 5$ fails. $\blacksquare$
01.01.2021 20:12
Solved this when I was sleeping lel. When $n \le 4$, we see that the solutions are $(a, b, c, n) = (2, 0, 0, 3), (1, 1, 0, 3), (4, 1, 1, 4).$ We will now prove that any $n \ge 5$ won't have any solutions. Notice how $n! \equiv 0 \pmod 8, n! \equiv 0 \pmod 3, n! \equiv 0 \pmod 5.$ First, if $b \ge 1$ with $\mod 3$, we see that $2^a+5^c \equiv (-1)^a+(-1)^c \equiv 0 \pmod 3$ which means $a$ and $c$ have different parities. Next, if we take $\mod 8$, we have two cases. Case 1: $2^a \equiv 4 \pmod 8, 3^b+5^c \equiv 4 \pmod 8.$ We immediately see that $a = 2$. Next, for $3^b+5^c \equiv 4 \pmod 8$, we must have $3^b \equiv 3 \pmod 8$ and $5^c \equiv 1 \pmod 8$, which means $c \equiv 0 \pmod 2$. Because $b \ge 1$ as $b \equiv 1 \pmod 2$, we see that $a$ and $c$ have the same parity, a contradiction. Case 2: $3^b+5^c \equiv 0 \pmod 8.$ We must have $3^b \equiv 3 \pmod 8$ and $5^c \equiv 5 \pmod 8$ in this case, which is equivalent to $b \equiv c \equiv 1\pmod 2$. Because $b \ge 1$, we have $a$ and $c$ must be different parities, so $a$ is even. Finally, if we take $\mod 5$, we see that $2^a \equiv 4, 1\pmod 5$, while $3^b \equiv 3, 2 \pmod 5$, a because $2^a+3^b \equiv 0 \pmod 5$, we have a contradiction. Therefore, the only solutions are the ones stated above when $n \le 4.$
20.03.2021 09:29
When $n \le 4$, it can be confirmed that the solutions are $(a, b, c, n) = (2, 0, 0, 3), (1, 1, 0, 3), (4, 1, 1, 4)$. Henceforth assume $n\ge 5$. Case 1: $a\ge 2$. Then mod 4 gives $(-1)^b+1\equiv 0 \pmod4$, so $b$ is odd; let $b=2k+1$ for some $k\ge 0$. If $a$ is even, then $4^{a/2}+3\cdot 9^k+5^c=n!$, so taking mod 5 gives $(-1)^{a/2} + 3(-1)^k \equiv 0 \pmod5$. This is impossible since the LHS is even and absolutely bounded by 4. Hence $a$ is odd; let $a=2\ell+1$ for some $\ell\ge 0$. Now $2\cdot 4^\ell+3\cdot 9^k+5^c=n!$, so taking mod 3 gives $2+(-1)^c \equiv 0 \pmod3$. Hence $c$ is even; let $c=2m$ for some $m\ge 0$. Now the equation becomes $2\cdot 4^\ell+3\cdot 9^k+25^m=n!$. Then mod 8 gives $2\cdot 4^\ell +3+1 \equiv 0 \pmod8$, but this is impossible both when $\ell=0$ and $\ell\ge 1$. Case 2: $a=1$. The equation is $3^b+5^c=n!-2$. Then mod 4 gives $(-1)^b+1\equiv -2\pmod4$, so $b$ is even; let $b=2k$ for some $k\ge 0$. Taking instead mod 3 gives $(-1)^c\equiv -2\pmod3$, so $c$ is even; let $c=2m$ for some $m\ge 0$. The equation is $9^k+25^m=n!-2$. Taking mod 8 gives $2\equiv -2\pmod8$, contradiction. Case 3: $a=0$. The equation is $3^b+5^c=n!-1$. Now mod 4 gives $(-1)^b+1\equiv -1\pmod4$, contradiction. So there are no solutions for $n\ge 5$, and we conclude.
25.03.2021 12:06
First suppose $n \le 4$. $n=0, 1, 2$ clearly yield no solutions since then the left hand side is less than 3. -If $n=3$ we have $2^a + 3^b + 5^c = 6$, so $c \le 1$. $c=1$ means $2^a+3^b=1$ which can't hold. So $c=0$. We want to solve $2^a+3^b=5$ and we can check that the solutions are $\boxed{a=1,b=1,c=0,n=3}$ and $\boxed{a=2,b=0,c=0,n=3}$ by inspection. -If $n=4$ we have $2^a + 3^b + 5^c = 24$, so $c \le 1$. --If $c=0$ then $2^a+3^b=23$, so $b \le 2$, but we can check there are no solutions by hand. --If $c=1$ then $2^a+3^b=19$. Thus $b \le 2$. We can check by inspection that the only solution is $\boxed{a=4,b=1,c=1,n=4}$. If $a=0$ and $n \ge 5$: then $1+3^b+5^c=n!$. The left hand side is odd and the right hand side is even, contradiction. If $b=0$ and $n \ge 5$: then $2^a+5^c+1=n!$. We have already done the case $a=0$. -If $a=1$ then we want to solve $5^c+3=n!$, but the left hand side is not $0 \pmod{3}$ and the right hand side is, contradiction. -If $a \ge 2$ then we have $1^c+1 \equiv 0 \pmod{4}$ which cannot hold. If $c=0$ and $n \ge 5$: we have already done the cases when $a=0$ or $b=0$, so $a, b \ge 1$. Now $(-1)^a+1 \equiv 0 \pmod{3}$ so $a$ is odd. -If $a=1$ then we want to solve $3+3^b = n!$. The left hand side is not divisible by $9$ but the right hand side is, contradiction. -If $a \ge 2$ then since $a$ is odd, $a \ge 3$. Then we have $3^b+1 \equiv 0 \pmod{8}$ which is not possible. Thus $a,b,c \ge 1$ and $n \ge 5$: then $(-1)^a + (-1)^c \equiv 0 \pmod{3}$, so $a, c$ have opposite parity. -If $a=1$ then by the above, $c$ is even. Now $2+(-2)^b \equiv 0 \pmod{5}$, so $b \equiv 1 \pmod{4}$, so $b$ is odd. But $2+3^b+(-3)^c \equiv 0 \pmod{8}$. But $b$ is odd and $c$ is even so the left hand side is $2+3+1 = 6 \pmod{8}$, contradiction. -If $a=2$ then by the above, $c$ is odd. Now $4+(-2)^b \equiv 0 \pmod{5}$ so $b$ is even. Then $4+3^b+(-3)^c \equiv 0 \pmod{8}$. But $b$ is even and $c$ is odd so the left hand side is $4+1+5 = 10 \pmod{8}$, contradiction. -If $a \ge 3$ then $2^a \equiv 0 \pmod{4}$, so $(-1)^b+1 \equiv 0 \pmod{4}$, so $b$ is odd. Then $2^a+(-2)^b \equiv 0 \pmod{5}$. This means $a \equiv 1 \pmod{4}$, so $a$ is odd. Therefore $c$ is even. Since $a \ge 3$, $2^a \equiv 0 \pmod{8}$ so $3^b+(-3)^c \equiv 0 \pmod{8}$. But $b$ is odd and $c$ is even, so the left hand side is $3+1 = 4 \pmod{8}$, contradiction.
04.09.2021 15:10
If $n<4$, we can find that the only solutions are $(a,b,c,n)$ $\boxed{(2,0,0,3)}$, $\boxed{(1,1,0,3)}$. If $n=4$, we have $c<2, a<5, b<3$. If $c=0$, we find that there are no solutions by testing out values for $b$. If $c=1$, then we find no solutions unless $b=1$. Therefore, $\boxed{(4,1,1,4)}$ is the only solution when $n=4$. Now it remains to find all solutions when $n>4$. We can take powers of $2,3,5$ $\pmod{120}$. $2^a$ $\{1,2,4,8,16,32,64\}$ $3^b$ $\{1,3,9,27,81\}$ $5^c$ $\{1,5,25\}$. No three add up to $0\pmod{120}$ so we are done.
05.09.2021 05:40
Assume $n \geq 5$. Mod 5, we we have $$2^a + 3^b \equiv 0 \pmod 5,$$which implies that $a, b$ must be the same parity. Mod 3, we have $$2^a+5^c \equiv 0 \pmod 3,$$implying that $a$ and $c$ must be opposite parity. Now assume $a \geq 2$ -- then mod 4, $$3^b + 5^c \equiv 0 \pmod 4,$$implies that $b$ and $c$ are the same parity mod 5. Combined with the previous two facts, this is an obvious contradiction. Now we get rid of edge cases. If $a=1$, then we have $$3^b + 5^c + 2 = n!.$$Modulo 120, $3^b+5^c \equiv 118 \pmod {120}$. But since $3^b \equiv 3, 9, 27, 81 \pmod {120}$ and $5^c \equiv 5, 25 \pmod {120}$, no combination of the two can attain 118, contradiction. Thus we only need to consider $n \leq 4$. For $n=4$, $3^b+5^c=22$ has no solutions. For $n=3$, $3^b+5^c=4$ solves to get $(b, c) = (1, 0)$; for any smaller $n$, there are also no solutions. Thus we have exhausted this case. Now, we consider $$2^a+3^b+5^c = 24.$$If $c=1, 2^a+3^b=19$, and if $b=1$ we obtain $a=4$ works. If $c=0$, then $2^a+3^b=23$, which has no solutions. For $n=3$, we also have the solution $(a, b, c)=(2, 0, 0)$. Thus the answers are $(4, 1, 1, 4)$, $(1, 1, 0, 3)$ and $(2, 0, 0, 3)$.
14.10.2021 14:58
The casework solutions are quite good, but mod 120 also works very well. The only solutions are $(a,b,c,n)=(1,1,0,3),(2,0,0,3),(4,1,1,4).$ These clearly work. Now we analyse $2^{a},3^{b},5^{c}\pmod{120}$. We get $2^{a}\equiv \{1,2,4,8,16,32,64\}\pmod {120}$, $3^{b}\equiv \{1,3,9,27,81\}\pmod {120}$ and $5^{c}\equiv \{1,5,25\}\pmod {120}$. Now, clearly, we have $2^{a}+3^{b}+5^{c}$ is not congruent to $0$ mod 120, so there exist no non-negative integer $a,b,c$ which satisfy $2^{a}+3^{b}+5^{c} =5!$. But we have $(n-1)!$ divides $n!$ for all $n.$ Hence no interger $n > 5$ satisfies the equation. We are done. $\boxed{}$
14.10.2021 15:04
sunfishho wrote: v_Enhance wrote: A tricky way to do this is to take modulo $120$, since \begin{align*} 2^a \pmod{120} &\in \{ 1, 2, 4, 8, 16, 32, 64 \} \\ 3^b \pmod{120} &\in \{ 1, 3, 9, 27, 81 \} \\ 5^c \pmod{120} &\in \{ 1, 5, 25 \} \end{align*}and by inspection one notes that no three elements have vanishing sum modulo $120$. Just wondering, what is the motivation for picking 120? Isn't that "intuitive", what I did was that I found the possible sols and then tried to find sols for n=5 , but ofc could not succeed, and I though about the fact (n-1)! divides n! .
27.10.2021 00:45
Pure. Spammage. By inspection we see for $n\le 4$ the solutions are $(a,b,c,n)=(1,1,0,3),(2,0,0,3),(4,1,1,4)$. We undergo pain in order to show there are no solutions when $n \ge 5$. If $a \ge 3$ then taking$\pmod{4}$ gives $b$ odd, and then taking$\pmod{8}$ gives $c$ odd, so we're solving $2^a+3\cdot 9^{b'}+5\cdot 25^{c'}=n!$. Taking$\pmod{3}$ gives $a$ even, and then$\pmod{5}$ gives $(-1)^{a'}+3\cdot (-1)^{b'} \equiv 0 \pmod{5}$: this is impossible. If $a=2$ then$\pmod{4}$ gives $b$ odd, and then (noting that $c>0$, otherwise$\pmod{3}$ gives a contradiction)$\pmod{5}$ gives $4+3 \cdot (-1)^{b'} \equiv 0 \pmod{5}$: this is impossible. If $a=1$ then$\pmod{4}$ gives $b$ even, and then (noting that $c>0$, otherwise$\pmod{8}$ gives a contradiction)$\pmod{5}$ gives $2+(-1)^b \equiv 0 \pmod{5}$: this is impossible. If $a=0$ then $2^a+3^b+5^c$ is odd.
27.10.2021 19:22
Cute one! For $n\le 4$, just case bash to get some (a,b,c,n). Please search up for those. Real fun is for showing no solutions for $n\ge 5$. Assume FTSOC $n\ge 5$. Then $n! \equiv 0 \pmod{5}$ $\implies 2^a+3^b+5^c \equiv 0 \pmod{5}$ $\implies 2^a \equiv -3^b \pmod{5}$ (*) Now $n! = 2^a+3^b+5^c \equiv 2^a+(-1)^b+1 \equiv 0 \pmod{4}$ If b is even, $2^a \equiv 2 \pmod{4}$ This implies $a=1$. Thus putting in (*), $3^b \equiv 3 \pmod{5}$ $\implies 9^m \equiv 3 \pmod{5}$, where $b=2m$ for some natural $m$. This is not possible for any $m$ and hence a contradiction to the assumption that $b$ is even. Hence $\boxed{\text{b Is odd!}}$. This gives in (*) $\implies 2^a \equiv (-3)^b \pmod{5}$ $\implies 2^a \equiv 2^b \pmod{5}$ $\implies 2^{a-b} \equiv 1 \pmod{5}$ If $a-b$ is odd, $2^{a-b} \equiv \{2,3\} \pmod{5}$, which is not possible. Hence, $a-b$ is even, or $\boxed{\text{a is odd!}}$. Now $n!=2^a+3^b+5^c \equiv (-1)^a+(-1)^c \equiv -1+(-1)^c \equiv 0 \pmod{3}$ $\implies (-1)^c \equiv 1 \pmod{3}$ Hence $\boxed{\text{c is even!}}$. Final move: checking (mod 8). $n! \equiv 2^a+3^b+5^c \equiv 2^a+3+1 \equiv 0 \pmod{8}$ $\implies 2^a \equiv 4 \pmod{8}$ This immediately implies $a=2$ which is not odd. Contradiction on the initial assumption that $n\ge 5$. So done! Remark: this problem was good but is it good enough for a TST#4?? It's just spamming modulo 3,4,5,8! That's all!
06.03.2022 04:11
Assume FTSOC $n\ge 5,$ noting $2^a+3^b+5^c\equiv n!\equiv 0\pmod{120}.$ We see $2^a\equiv 1,2,4,8,16,32,64\pmod{120},$ $3^b\equiv 1,3,27,81\pmod{120},$ and $5^c\equiv 1,5,25\pmod{120}.$ Since $64+27+25<120,$ we know $2^b\equiv 81\pmod{120}$ so $2^a+5^c\equiv 39\pmod{120},$ which is absurd. Hence, $n=1,2,3,4.$ Case 1: $n=1.$ Note $2^a+3^b+5^c\ge 1+1+1=3$ so we have no solutions. Case 2: $n=2.$ Note $2^a+3^b+5^c\ge 3>2!$ so we have no solutions. Case 3: $n=3.$ We proceed by casework on $a.$ If $a=0,$ we have no solutions. If $a=1,$ $(1,1,0,3)$ works. If $a=2,$ $(2,0,0,3)$ works. Case 4: $n=4.$ Again, we use caswork on $a.$ If $a=0,1,2,3$ we have no solutions. If $a=4,$ $b=c=1$ or $(4,1,1,4)$ works. Our solutions are $(a,b,c,n)=\boxed{(1,1,0,3),(2,0,0,3),(4,1,1,4)}.$ $\square$
30.03.2022 18:23
Exhaustive casework. Case 1: $a\ge3$ and $n\ge5$ Taking$\pmod8$, we have: $$3^b+(-3)^c\equiv0\pmod8.$$Let $b=2y+e_1$ and $c=2z+e_2$ with $\{e_1,e_2\}\subseteq\{0,1\}$, then $3^{e_1}+(-3)^{e_2}\equiv0\pmod8$, so $e_1=e_2=0$. Then: $$2^a+9^y+25^z=n!.$$Taking$\pmod3$ gives: $$(-1)^a\equiv-1\pmod3$$so $a$ is odd. Let $a=2x+3$ for some $x\ge0$, then: $$8\cdot4^x+9^y+25^z=n!.$$Finally,$\pmod5$ gives: $$3\cdot(-1)^x+(-1)^y\equiv0\pmod5,$$a contradiction (since this is impossible for any $x$ and $y$). Case 2: $a\le2$ and $n\ge5$ Case 2.1: $a=0$ and $n\ge5$ We have: $$1+3^b+5^c=n!.$$By$\pmod4$, we have $2+(-1)^b\equiv0\pmod4$, so no solutions exist in this case. Case 2.2: $a=1$ and $n\ge5$ We have: $$2+3^b+5^c=n!.$$By$\pmod4$, $3+(-1)^b\equiv0\pmod4$ and so $b$ is even. Let $b=2y$. By$\pmod3$, $2+(-1)^c\equiv0\pmod3$ and so $c$ is even. Let $c=2z$. The equation transforms into: $$2+9^y+25^z=n!.$$By$\pmod8$, $4\equiv0\pmod8$ which is absurd. Hence no solutions. Case 2.3: $a=2$ and $n\ge5$ We have: $$4+3^b+5^c=n!.$$By$\pmod4$, $(-1)^b+1\equiv0\pmod4$ and so $b$ is odd. Let $b=2y+1$. By$\pmod5$, $-1+3\cdot(-1)^y\equiv0\pmod5$ which is impossible. Case 3: $n\le4$ Case 3.1: $n\in\{0,1,2\}$ This is also impossible as: $$n!=2^a+3^b+5^c\ge1+1+1=3.$$ Case 3.2: $n=3$ Then $2^a+3^b+5^c=6$, so $5^c\le6$. This means that $c\le1$. If $c=1$ then $2^a+3^b=1$ which has no solutions. If $c=0$ then $2^a+3^b=5$, so $b\le1$. If $b=1$ then $a=1$, whereas if $b=0$ then $a=2$, which gives that $(a,b,c,n)=\boxed{(2,0,0,3)}$ and $\boxed{(1,1,0,3)}$ are solutions Case 3.3: $n=4$ Then $2^a+3^b+5^c=24$, so $c\le1$. If $c=0$ then $2^a+3^b=23$, so $b\le2$. For each of these cases there is no corresponding value of $a$ that works. If $c=1$ then $2^a+3^b=19$, so $b\le2$. If $b=0$ or $b=2$ no solutions exist, but if $b=1$ we have that $(a,b,c,n)=\boxed{(4,1,1,4)}$ is a solution.
15.04.2023 21:14
O maa gu turu lob! I never knew $\pmod{120}$ had such nice modulos for powers for $2$, $3$ and $5$. For $n\ge 5$, take $\pmod{120}$ to get the following powers: \begin{align*} 2^a&\equiv\left\{1,2,4,8,16,32,64\right\}\pmod{120}\\ 3^b&\equiv\left\{1,3,9,27,81\right\}\pmod{120}\\ 5^c&\equiv\left\{1,5,25\right\}\pmod{120} .\end{align*} Now some case bashing shows none of these actually work (in other words left for the reader to prove ). Now finally some more case bashing for $4!$ and $3!$ (the ones below these don't work due to size reasons) show that $\boxed{(3,2,0,0)}$, $\boxed{(3,1,1,0)}$ and $\boxed{(4,4,1,1)}$ are the only ones that actually work for the tuples of $(n,a,b,c)$ respectively (which is again left for the reader to prove ) and we are done.
27.05.2023 14:48
Claim: The only solutions are $\boxed{(a,b,c,n)=(1,1,0,3), (2,0,0,3), (4,1,1,4)}$ Proof: After a manual check, the only solutions for $n\le4$, are the ones stated in the claim, so from now on, $FTSOC$ assume $n\ge5$ Part 1: Taking$\pmod 4$ $2^a+3^b+5^c\equiv 3+1 \pmod 4 \Longleftrightarrow 3^b\equiv 3 \pmod 4$ however this in only possible when $b\equiv 1 \pmod 2$, thus $b$ is odd. Part 2: Taking$\pmod 5$ $2^a+3^b+5^c\equiv 0 \pmod 5\Longleftrightarrow 2^a\equiv -3^b$ furthermore, since $b$ is odd, we can rewrite the expression as $2^a\equiv \left(-3\right)^b \pmod 5$ thus since $b$ is odd, $\left(-3\right)^b\equiv 2,3 \pmod 5$, which forces $2^a\equiv 2,3 \pmod 5$ which implies that $a\equiv 1\pmod 2$, or $a$ is odd. Part 3: Taking $\pmod 3$ $2^a+3^b+5^c\equiv (-1)^a+0+(-1)^c\pmod 3 \Longrightarrow n!\equiv 0\equiv (-1)^a+(-1)^c\pmod 3$ thus $a$ and $c$ are pairwise distinct, however this forces $c\equiv 0\pmod 2$ or $c$ to be even, from the fact that $a$ is odd. Part 4 (final part): Taking $\pmod 8$ $n!=2^a+3^b+5^c\equiv 4+3+1\equiv0\pmod 8$, thus$2^a\equiv 4\pmod8$ however this is only possible when $a=2$, which contradicts the previously statement that $a$ is odd. Thus we have reached a contradiction, so there exist no solution for $n\ge5$ $\blacksquare$
09.08.2023 21:58
lol just throw random things at the board until it sticks Note that $(n,a,b,c,)=(3,2,0,0),(3,1,1,0),(4,4,1,1)$ are the only solutions manually caseworked for $n<5$, so assume henceforth that n is at least 5. We see $$2^a\equiv 1,2,4,8,16,32,64\pmod{120},3^b\equiv 1,3,27,81\pmod{120},5^c\equiv 1,5,25\pmod{120}.$$$$64+27+25<120\implies 3^b\equiv 81\pmod{120}\implies 2^a+5^c\equiv 39\pmod{120},$$which can be checked to see that it doesn't work, so our only solutions are indeed the ones listed above. I also had a decently long casework bash but its just elementary techniques and since I'm not going to learn anything from it (usually imo diophantine you don't really need any skill its like fe but usually easier) i wont type it up
08.09.2023 13:36
$\textcolor{red}{Claim:}$ $n<5.$ $\textcolor{red}{Proof:}$ Assume $n\geq5.$ Then if $a\geq1$ we have $3^{b}+5^{c}\equiv0\pmod 4$ and $b\equiv c\equiv 1\pmod 2.$ Say $b=2b_1+1$ and $c=2c_1+1.$ Then if we look at the expression in modulo 3 we see $2^{a}+5\equiv0\pmod3$ and, $a\equiv 0\pmod 2.$ Say $a=2a_1.$ Then in modulo 5 we have $2^{2a_1}+3^{2b_1+1}\equiv 0\pmod 5.$ Since $2^{2a_1}\equiv\{4,1\}$ and $3^{2b_1+1}\equiv\{3,2\}$ we have a contradiction and $a$ must be $0$ and $b=4b_2+1$. Now let's solve $2+3^{4b_2+1}+5^{2c_1+1}$ Looking at the expression in modulo 9 gives us $5^{2c_1+1}\equiv7\pmod9$ and $c=6k+2$ but since $c=2c_1+1=6k+2$ means $c\equiv1\equiv0\pmod 2$ we have a contradiction. b must be equal to 0. Now we have $5+5^{2c_1+1}=n!$ but for $n\geq5$ this means $10\equiv 0\pmod 3.$ Contradiction. Our claim is right. Now let's solve for $n\leq4$: For $n=4,$ we have $3^{b}+5^{c}=\{14,8,6,10,4,2\}$. In this case only $\{a,b,c,n\}=\{4,1,1,4\}$ is possible. For $n=3$ we have $2^{a}+3^{b}={5,4,3,2}$. Only $2^{a}+3^{b}=5$ meaning either $\{a,b,c,n\}=\{2,0,0,3\}$ or $\{a,b,c,n\}=\{1,1,0,3\}$ is possible in this case. For $n\leq2$ we have $n!\leq 2$ but $2^{a}+3^{b}+5^{c}\geq 3$ a contradiction. The only possible solutions are $\{a,b,c,n\}=\boxed{\{4,1,1,4\}},\boxed{\{2,0,0,3\}},\boxed{\{1,1,0,3\}}.$
20.10.2023 20:53
We claim that the only solutions are $(a, b, c, n) = (1, 1, 0, 3), (2, 0, 0, 3), (4, 1, 1, 4)$. There are clearly no other solutions for $a, b, c, n \leq 4$. (Feeling kind of lazy) Taking $\pmod{120}$ for $n > 4$, then \[2^a + 3^b + 5^c \equiv 0\pmod{12}\] \[2^a \equiv 2, 4, 8, 16, 32, 64\pmod{120}\] \[3^b \equiv 3, 9, 27, 81\pmod{120}\] \[5^c \equiv 5, 25\pmod{120}\]. By inspection, none of these add up to $0\pmod{120}$, so it is impossible for $n > 4$. Hence, the only solutions are $(a, b, c, n) = (1, 1, 0, 3), (2, 0, 0, 3), (4, 1, 1, 4)$.
28.10.2023 09:20
The solutions are \begin{align*} (a,b,c, n) &= (2,0,0,3) \\ &= (1,1,0,3) \\ &= (4, 1, 1, 4) \end{align*} Notice that if $n \le 4$, we can manually check each case and find each of the above solutions. We will prove that there are no more solutions for $n>4$. For each $n>4$, note that \[120 \mid n! = 2^a+3^b+5^c.\] However, analyzing each of the residues of each individual power, we see that none of them cancel modulo $120$. Thus, there are no solutions when $n>4$.
17.01.2024 21:28
Ah yes, the famous 5M TSTST problem. Assume that $n \ge 5$. We'll analyze modulo $120$. $2^a$ modulo $60$ is $\{1, 2, 4, 8, 16, 32, 64\}$, $3^b$ modulo $120$ is $\{1, 3, 9, 27, 81\}$, and $5^c$ modulo $120$ is $\{ 1, 5, 25 \}$. Note that the max sum of residues is $170,$ which means that our residue sum must be exactly $120$. Note that if the second residue is $\le 27,$ then the max sum of residues is $116 < 120,$ so our second residue must be $81$. Then, the sum of the remaining residues must be $39$. Note that this isn't possible (just check that none of $39 - 1, 39 - 5, 39 - 25$ appear in the first set), so there's no solutions for $n \ge 5$. It remains to find the solutions for $n \le 4$. For $n \in \{0, 1, 2 \},$ $2 \ge n! = 2^a + 3^b + 5^c \ge 3,$ clearly a contradiction. So, only cases remaining are $n = 3,$ and $n = 4$. For $n = 3,$ we have $2^a + 3^b + 5^c = 6,$ which gives solution $(a, b, c) = (1, 1, 0), (2, 0, 0).$ For $n = 4,$ we have $2^a + 3^b + 5^c = 24,$ whic gives solution $(a, b, c) = (4, 1, 1).$ So, the only solutions are $(a, b, c, n) = (2, 0, 0, 3), (1, 1, 0, 3), (4, 1, 1, 4).$
27.03.2024 10:54
First we can see that $(a,b,c,n)\in\{(1,1,0,3),(2,0,0,3),(4,1,1,4) \}$ are the only solutions for $n\leq 4$. Now if $n\geq 5$. Mod $4$ implies $b$ is odd and mod $3$ gives us $a,c$ have different parities. If $c$ is even and $a,b$ are odd, taking the expression mod $8$ ends the case. If $a$ is even and $b,c$ are odd then mod $5$ ends the problem. $$\mathbb{Q.E.D.}$$
17.11.2024 04:57
The only solutions are $(2,0,0)$, $(1,1,0)$, and $(4,1,1)$, which clearly work. One can manually check that these are the only solutions for $n\le 4$. Now we prove that there are no other solutions for $n\ge 5$. The idea is to take $\mod {120}$. Note that $$2^a\pmod {120}\in \{1,2,4,8,16,32,64\}$$$$3^b\pmod {120}\in \{1,3,9,27,81\}$$$$5^c\pmod {120}\in \{1,3,9,27,81\}.$$Note that if you choose one element from each of these sets, they cannot sum to $0\pmod {120}$. However, $n\ge 5$ implies $$n!\equiv 0\pmod {120},$$done.