Maths Olympiad Prep

Library / /135 of 520

Number theory Difficulty 6.0 AIME, harder Prove it

Prove that there exist infinitely many pairs (m,n)(m, n) of positive integers such that m+nm+n divides (m!)n+(n!)m+1(m!)^{n}+(n!)^{m}+1.

Solution

We shall find a pair such that m+n=pm+n=p is prime and nn is even. Applying Wilson's theorem we have

m!=(pn)!=(p1)!(pn+1)(p2)(p1)1(n1)(2)(1)1(n1)!nn!(modp) m!=(p-n)!=\frac{(p-1)!}{(p-n+1) \ldots(p-2)(p-1)} \equiv \frac{-1}{-(n-1) \ldots(-2)(-1)} \equiv \frac{1}{(n-1)!} \equiv \frac{n}{n!} \quad(\bmod p)

It follows from Fermat's Little Theorem that (n!)pn!(modp)(n!)^{p} \equiv n!(\bmod p), therefore

(m!)n+(n!)m+1(nn!)n+(n!)pn+1nn+n!+(n!)n(n!)n(modp) (m!)^{n}+(n!)^{m}+1 \equiv\left(\frac{n}{n!}\right)^{n}+(n!)^{p-n}+1 \equiv \frac{n^{n}+n!+(n!)^{n}}{(n!)^{n}} \quad(\bmod p)

thus it suffices to prove that the number nn+n!+(n!)nn^{n}+n!+(n!)^{n} has a prime divisor p>np>n for infinitely many even nn.

We prove that this condition is satisfied, for instance, by all the numbers of the form n=2qn=2 q, where q>2q>2 is prime. Let A=(2q)2q+(2q)!+((2q)!)2qA=(2 q)^{2 q}+(2 q)!+((2 q)!)^{2 q}. For a prime pp and integer kk we denote by vp(k)v_{p}(k) the largest integer \ell such that pp^{\ell} divides kk.

If r(2q)2q>22q1q2r(2 q)^{2 q}>2^{2 q-1} q^{2}, therefore AA has a prime divisor p>2qp>2 q, q.e.d.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.