Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2015/discrete-mathematics-continuous-mathematics-and-probability-resit/2/c/solution

The initial values of the two sequences agree: and . For , use the first-order recurrence relation at and :
Therefore satisfies exactly the same derangement recurrence as . By strong induction, equality of the preceding two terms implies equality of the next term. Consequently
The first-order recurrence relation therefore also counts derangements.

New to topics? Read the docs here!