**POLYA014: Square as sum of two factorials **(proposed by
Lev Emelyanov, 11/18/01).

2^2=2!+2!; 5^2=4!+1!; 11^2=5!+1!; 12^2=5!+4!; 71^2=7!+1!. Does there
exist any more n^2=k!+m!?

**Discussion. [SCL, 11/26/01]: **I have only a small
contribution on this one, but perhaps it will give somebody else a clue.

Let f(q) denote the number of zeroes at the end of q,
and let g(k)=f(k!). That is g(k)=n/5+n/25+n/125+..., where each quotient
is truncated. (In TeX, this would look something like $g(k)=\lfloor n/5
\rfloor + \lfloor n/25 \rfloor + \lfloor n/125 \rfloor + \lfloor n/6255
\rfloor + ...$)

Suppose that k\le m. Then, if k!+m! is a
square, f(k!+m!) is even. Now, if g(k) is odd, g(k)=g(m), limiting the
possible values of m for such a k: m\le k+4- (k mod 5).

Maybe somebody could do a bit more by looking at
the last non-zero digit. For a square, this would be a 1, 4, 9, 6, 5, but
for factorials (after the initial segment), it is 2, 4, 6, or 8. If k<m,
then k! must end ...4000...000 or ...6000...000, again limiting the
k that need to be checked.

I've done a little computer run without either
of these tricks, and there are no other solutions besides the five shown
in the statement of the problem, with 1\le k\le 560 and k\le m\le 1000.
(That is, any other example either has k>560 or m>1000.)

Obviously, with the tricks, I could have saved about
three quarters of the time of the computer run, since g(k) rates to be
odd approximately half the time, and k! has last non-zero digit 4 or 6
about half the time (at a rough guess), and I assume these are somewhat
independent.

**Bibliography.**

**Return to [Polya
Home Page] [Members]
[Problem Center]
[Inventory]
[Reserve Area]**