Solution. By calculating the first few values, it can be conjectured that if n>1, then an=(n−1)(n−3)… (i.e., a2k=(2k−1)(2k−3)⋅5⋅3⋅1, and a2k+1=2k(2k−2)…⋅6⋅4⋅2). We will prove that this is indeed the case by complete induction.
i) For n=2,3,4, this is obviously true, since a2=1,a3=2, a4=12⋅1+1!=3
ii) Suppose the statement is true up to n+2; then an+2=(n+1)(n−1)…,an+1=n(n−2)…, and an=(n−1)(n−3)…. Using these, we will prove the statement for n+3:
an+3=anan+2an+1+n!
Notice that by the induction hypothesis,
an+2an+1=((n+1)(n−1)…)⋅(n(n−2)…)==(n+1)n⋅(n−1)⋅(n−2)⋅…⋅4⋅3⋅2⋅1=(n+1)!
thus
an+3=an(n+1)!+n!=an(n+1)n!+1⋅n!==(n−1)(n−3)…(n+2)n(n−1)(n−2)(n−3)…4⋅3⋅2⋅1==(n+2)n(n−2)(n−4)⋅…
Remark. We could have proved by complete induction that an+1=ann!, from which it also easily follows that an=(n−1)(n−3)⋯