If $a!+\left(a+2\right)!$ divides $\left(a+4\right)!$ for some nonnegative integer $a$, what are all possible values of $a$?

[i]2019 CCA Math Bonanza Individual Round #8[/i]
1. We start with the given condition that \( a! + (a+2)! \) divides \( (a+4)! \) for some nonnegative integer \( a \). We need to find all possible values of \( a \).

2. First, express the factorials in a more manageable form:
   \[
   (a+2)! = (a+2)(a+1)a!
   \]
   \[
   (a+4)! = (a+4)(a+3)(a+2)(a+1)a!
   \]

3. Substitute these into the given condition:
   \[
   \frac{(a+4)!}{a! + (a+2)!} = \frac{(a+4)(a+3)(a+2)(a+1)a!}{a! + (a+2)(a+1)a!}
   \]

4. Factor out \( a! \) from the denominator:
   \[
   \frac{(a+4)(a+3)(a+2)(a+1)a!}{a!(1 + (a+2)(a+1))} = \frac{(a+4)(a+3)(a+2)(a+1)}{1 + (a+2)(a+1)}
   \]

5. Let \( k \) be an integer such that:
   \[
   \frac{(a+4)(a+3)(a+2)(a+1)}{1 + (a+2)(a+1)} = k
   \]
   This implies:
   \[
   (a+4)(a+3)(a+2)(a+1) = k(1 + (a+2)(a+1))
   \]

6. Clearly, \( (a+1)(a+2) \) must divide \( k \). Let \( k = (a+1)(a+2)j \) for some integer \( j \). Substituting this into the equation, we get:
   \[
   (a+3)(a+4) = j(1 + (a+1)(a+2))
   \]

7. Rearrange to solve for \( j \):
   \[
   j = \frac{(a+3)(a+4)}{1 + (a+1)(a+2)}
   \]

8. Simplify the expression for \( j \):
   \[
   j = \frac{a^2 + 7a + 12}{a^2 + 3a + 3}
   \]
   \[
   j = 1 + \frac{4a + 9}{a^2 + 3a + 3}
   \]

9. For \( j \) to be an integer, \( \frac{4a + 9}{a^2 + 3a + 3} \) must also be an integer. Since \( j \geq 2 \) (as \( j = 1 \) implies \( a = -\frac{9}{4} \), which is not a nonnegative integer), we have:
   \[
   \frac{4a + 9}{a^2 + 3a + 3} \geq 1
   \]

10. Solve the inequality:
    \[
    \frac{4a + 9}{a^2 + 3a + 3} \geq 1
    \]
    \[
    4a + 9 \geq a^2 + 3a + 3
    \]
    \[
    a^2 - a - 6 \leq 0
    \]

11. Factor the quadratic inequality:
    \[
    (a - 3)(a + 2) \leq 0
    \]

12. Solve the inequality:
    \[
    -2 \leq a \leq 3
    \]

13. Since \( a \) must be a nonnegative integer, the possible values are \( a = 0, 1, 2, 3 \).

14. Verify each value:
    - For \( a = 0 \):
      \[
      0! + 2! = 1 + 2 = 3
      \]
      \[
      4! = 24
      \]
      \[
      3 \mid 24 \quad \text{(True)}
      \]
    - For \( a = 1 \):
      \[
      1! + 3! = 1 + 6 = 7
      \]
      \[
      5! = 120
      \]
      \[
      7 \nmid 120 \quad \text{(False)}
      \]
    - For \( a = 2 \):
      \[
      2! + 4! = 2 + 24 = 26
      \]
      \[
      6! = 720
      \]
      \[
      26 \nmid 720 \quad \text{(False)}
      \]
    - For \( a = 3 \):
      \[
      3! + 5! = 6 + 120 = 126
      \]
      \[
      7! = 5040
      \]
      \[
      126 \mid 5040 \quad \text{(True)}
      \]

15. Therefore, the possible values of \( a \) are \( 0 \) and \( 3 \).

The final answer is \( \boxed{0, 3} \)