3
$\begingroup$

Please, give me a hint

Can the last four digits of the sum $n!+m!$ be 1990?

Or, in other words, can one find such $n,m$ that $m!+n! \mod 10^4 = 1990$?

$\endgroup$

5 Answers 5

6
$\begingroup$

No it is not possible. It is not possible to have the last two digits $90$. Starting from $120=5!$ the last two digits are divisible by $20$ while $90$ is not, so $m,n\ge5$ does not work as the sum $m!+n!$ has last two digits divisible by $20$. You may try to use $3!=6$ and $4!=24$ their sum is $30$ does not work. You may try $m\le4$, $n\ge5$ then the last digit of the sum $m!+n!$ won't be $0$ (it will be the same as the last digit of $m!$). There are no other possibilities.

$\endgroup$
1
  • 1
    $\begingroup$ +1 I like this best. Mod $20$, $n!$ must be among $\{1, 2, 6, 4, 0\}$. The only way to sum to $90\equiv10$ mod $20$ is with $6+4$, but that is only realizable as $3!+4!$. $\endgroup$
    – 2'5 9'2
    Apr 26, 2015 at 17:49
4
$\begingroup$

Once $n$ or $m$ is $20$ or greater, than $10^4$ divides $n!$. So you don't have too many cases to check.

And I'd start by checking if there are any ways to get $90$ mod 100. Then you only need to examine $m$ and $n$ up to $10$. Either there are no solutions, and then you have no solutions to the larger problem. Or there will be some solutions, and any solutions to the larger problem must be extensions from this smaller problem's solutions.

$\endgroup$
2
$\begingroup$

We have that $1990\equiv 115\pmod{5^4}$ but the only possible residue classes of $n!\pmod{625}$ are given by $k!\pmod{625}$ for $k\in[1,20]$, hence:

$$ n!\pmod{625}\in\left\{0, 1, 2, 6, 24, 40, 50, 95, 120, 125, 175, 320, 350, 375, 380, 500, 550, 575\right\}=A$$ and since $115$ does not belong to $A+A$ we have that there are no solutions to $$ n!+m!\equiv 1990\pmod{10^4}.$$

$\endgroup$
1
$\begingroup$

Remeber that $n!$ is going to end with four zeros for all $n$ greater than or equal to $20$ so if there are such numbers then $n!$ and $m!$ are smaller than $20$. (unless there is a factiorial that ends in $1990$, which does not happen).

I recommend you write down the first $19$ factorials and try some combinations, although it is unlikely that there are solutions.

$\endgroup$
1
$\begingroup$

The remainder $k!\bmod 8$ is one of $1,2,6$, or (namely for all $k\ge 4$) $0$. Since $x\equiv 1990\pmod{10}^4$ implies $x\equiv 6\pmod 8$, we conclude that wlog. $n=3$ and $m\ge 4$. So we need $m!\equiv 1984\pmod{10^4}$. Since that implies $m!\not\equiv 0\pmod 5$, we conclude $m\le 4$, but then $m!\le 43< 1984$. Hence no solution exists.

$\endgroup$
1
  • $\begingroup$ This is great but very hard to follow, can you add in the missing intermediate steps you omitted? $\endgroup$
    – smci
    Dec 6, 2019 at 5:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .