MathLabs

Problem 1

Find all quadruples of positive integers (a,p,m,o)(a, p, m, o) with o≥2o \ge 2 such that a!+p!=mo+26a! + p! = m^o + 26.
Step 1 of 5: Reduce to p≤3p \le 3
o≥2, p≥4  ⟹  4∣a!, 4∣p!  ⟹  mo=a!+p!−26≡2(mod4)o\ge2,\ p\ge4 \implies 4\mid a!,\ 4\mid p! \implies m^{o}=a!+p!-26\equiv2\pmod4
Detailed analysis

Assume without loss of generality a≥pa\ge p. If p≥4p\ge4 then both a!a! and p!p! are divisible by 44, so mo=a!+p!−26≡−26≡2(mod4)m^o=a!+p!-26\equiv-26\equiv2\pmod4. But for o≥2o\ge2, mom^o is odd when mm is odd and divisible by 44 when mm is even, so mo≡2(mod4)m^o\equiv2\pmod4 is impossible. Hence p∈{1,2,3}p\in\{1,2,3\}.