A similar question has been asked before but I haven't seen an answer to this specific one after looking for so long.
I have a recursive function where:
- $P(2) = 1$
- For $n ≥ 3$, $P(n) = (n-2)P(n-1) + 1$
Here are the set of answers for P(n) for $n ≥ 2$:
- $\{1, 2, 5, 16, 65, 326, 1957, 13700, \cdots\}$
Here are the arithmetic progressions I've written down so far:
- $P(3) = (1 ⋅ 1) + 1 = 1 + 1 = 2 (= 2⋅1! + 0 ????)$
- $P(4) = (1+1)⋅2 + 1 = 2⋅2! + 1 = 5$
- $P(5) = [2⋅2! + 1]⋅3 + 1 = 2⋅3! + 4 = 16$
- $P(6) = [2⋅3! + 4]⋅4 + 1 = 2⋅4! + 17 = 65$
So it seems like there's a progressions with factorials, but I can't seem to put it all together. Here are my problems:
I can't figure out the factorial form of $P(3)$. Does it have 0 as coefficient?
The coefficients of the factorial forms $(i.e. \{1, 4, 17, 86, 517, \cdots \})$ form another recursive function of the same kind as the original.
Because of $1$ and $2$, I can't put it all together into a nice, closed-form function for $n ≥ 3$.