Find all possible values of a natural number $n$ such that $a! + b! = 5^n$

147 Views Asked by At

I got the following problem:

Find all possible values of a natural number n such that $$ a! + b! = 5^n $$

My solution:
Since $5^n$ is always an odd number, $a!$ needs to be odd and $b!$ to be even or vice-versa. The only possible value for $a$ then is 1, assuming $a\le b$. $$ 1 + b! = 5^n $$

I am not sure on how to proceed from here. My first guess was to try to find all possible values such that $$ n = \log_{5}(b!) $$ However I could not proceed further. Any help would be appreciated.

3

There are 3 best solutions below

1
On BEST ANSWER

note: for $a\geq5$ and $b\geq5$ the last digits of $a!$ and $b!$ will be $0$ , giving the last digit of $a!+b!$ as $0$ . But , this will contradict that $a!+b!=5^n$ as $5^n$ have last digit as $5$ .

Hence $a<5$ and $b<5$ i.e. $(a,b)\in\{(1,1) , (2,2) , (3,3),(4,4),(1,2),(1,3),\color{red}{(1,4)},(2,1),(2,3),(2,4),(3,4)\}$ .

Among these only $(a,b)=(1,4)$ or $(4,1)$ satisfys the condition . $$1!+4!=5^2$$

0
On

Wlog $a\le b$ so, working modulo $2$, $a\le1$ and $a!=1$. Then $5\nmid b!$ and $b\le4$. We can easily check the only solution is $b=4$, so $n=2$.

0
On

Once you render $a!=1$, then $b!\equiv-1\bmod 5$. Since $5!$ and larger factorials are multiples of $5$ we must have $b\le4$, and then only $4!$ has the proper residue. So either $0!+4!=5^2$ or $1!+4!=5^2$, nothing more.