Find number of integral values of (x, y, z, w) given that x! + y! = 2^z 3^w.

Check the final answer first, then review the worked steps.

Answer

8

Work

1. $x=y=1: 1!+1!=2=2^1 3^0 \to (1,1,1,0)$
2. $x=y=2: 2!+2!=4=2^2 3^0 \to (2,2,2,0)$
3. $x=y=3: 3!+3!=12=2^2 3^1 \to (3,3,2,1)$
4. $x=y=4: 4!+4!=48=2^4 3^1 \to (4,4,4,1)$
5. $x=1, y=2: 1!+2!=3=2^0 3^1 \to (1,2,0,1)$
6. $x=1, y=3: 1!+3!=7 (X)$
7. $x=2, y=4: 2!+4!=26 (X)$
8. $x=3, y=4: 3!+4!=30 (X)$
(Symmetry $x,y$ adds permutations)

Step-by-step solution

Assuming $x, y, z, w \ge 0$, we test small values. For $x=y$, $2(x!) = 2^z 3^w \implies x! = 2^{z-1} 3^w$. Solutions include $(1,1,1,0), (2,2,2,0), (3,3,4,1), (4,4,6,1)$. For $x \neq y$, WLOG $x < y$, we find $(1,2,1,0), (1,3,2,0), (2,4,5,0), (3,4,5,0)$. Checking all combinations yields 8 distinct quadruplets.